Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Feb 23, 2019 12:48 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: How to use Device Rules (Automation)
PostPosted: Fri Jan 25, 2019 10:30 am 
Offline

Joined: Fri Jan 25, 2019 8:27 am
Posts: 4
Location: Germany
Hi,

I want to assign a Device Template to a newly added Devie by using the Device Rules.

But how is the syntax for the matching.

I want to search a specific string within the sysDescr ... but i don't know how, please help ...


Didn't find anything on the internet

thank you


Last edited by Feliche on Mon Jan 28, 2019 9:10 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: How to use Device Rules
PostPosted: Fri Jan 25, 2019 3:03 pm 
Offline
Cacti User
User avatar

Joined: Fri Feb 10, 2017 2:45 pm
Posts: 182
Location: Long Island, New York, USA
As far as I am aware, the device templates are for when you are creating new devices. You assign the template of say for example a Cisco switch when adding a new one. All the graphs and templates associated with Cisco switches will be available to use under that device without having to add them individually. If they are already defined, then I believe you have to go back to that existing device and change the template there. There isn't a way to have devices moved automatically. (unless there is something I have missed...)

_________________
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Live: Cacti 1.1.38 @ CentOS 7-5.1804.5.e17
Test: Cacti 1.1.38 @ CentOS 7-6.1810.2.e17


Top
 Profile  
 
 Post subject: Re: How to use Device Rules
PostPosted: Mon Jan 28, 2019 2:40 am 
Offline

Joined: Fri Jan 25, 2019 8:27 am
Posts: 4
Location: Germany
camerabob wrote:
As far as I am aware, the device templates are for when you are creating new devices. You assign the template of say for example a Cisco switch when adding a new one. All the graphs and templates associated with Cisco switches will be available to use under that device without having to add them individually. If they are already defined, then I believe you have to go back to that existing device and change the template there. There isn't a way to have devices moved automatically. (unless there is something I have missed...)


There isn't a problem with die Device Templates, they work fine.

I want to asign them automaticaley to a new Device

thanks anyway


Top
 Profile  
 
 Post subject: Re: How to use Device Rules
PostPosted: Mon Jan 28, 2019 8:34 am 
Offline
Cacti User
User avatar

Joined: Fri Feb 10, 2017 2:45 pm
Posts: 182
Location: Long Island, New York, USA
Under 'Settings', 'Device Defaults' you can set the template that new entries will receive, but it won't be dynamic. You will have to change it if you are going to be implementing a different type of device over time.

_________________
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Live: Cacti 1.1.38 @ CentOS 7-5.1804.5.e17
Test: Cacti 1.1.38 @ CentOS 7-6.1810.2.e17


Top
 Profile  
 
 Post subject: Re: How to use Device Rules
PostPosted: Mon Jan 28, 2019 8:49 am 
Offline

Joined: Fri Jan 25, 2019 8:27 am
Posts: 4
Location: Germany
camerabob wrote:
Under 'Settings', 'Device Defaults' you can set the template that new entries will receive, but it won't be dynamic. You will have to change it if you are going to be implementing a different type of device over time.


And for what purpose ist the "device rules" feature in Cacti?
(see screenshot)


Attachments:
Unbenannt.PNG
Unbenannt.PNG [ 24.48 KiB | Viewed 69 times ]
Top
 Profile  
 
 Post subject: Re: How to use Device Rules
PostPosted: Mon Jan 28, 2019 9:07 am 
Offline
Cacti User
User avatar

Joined: Fri Feb 10, 2017 2:45 pm
Posts: 182
Location: Long Island, New York, USA
That is under the automation area. I have no idea how that works.

_________________
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Live: Cacti 1.1.38 @ CentOS 7-5.1804.5.e17
Test: Cacti 1.1.38 @ CentOS 7-6.1810.2.e17


Top
 Profile  
 
 Post subject: Re: How to use Device Rules (Automation)
PostPosted: Mon Jan 28, 2019 10:23 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2083
That is the automation section.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: How to use Device Rules (Automation)
PostPosted: Mon Jan 28, 2019 10:39 am 
Offline

Joined: Fri Jan 25, 2019 8:27 am
Posts: 4
Location: Germany
netniV wrote:
That is the automation section.


I Know, as i said, i want to use the rules to add a template automaticaly
So,how is the Syntax for this ?

hope you can help
unfortunately your dokumentation about the automation section isn't too extensive


Top
 Profile  
 
 Post subject: Re: How to use Device Rules (Automation)
PostPosted: Mon Jan 28, 2019 2:57 pm 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 180
Feliche wrote:
netniV wrote:
That is the automation section.


I Know, as i said, i want to use the rules to add a template automaticaly
So,how is the Syntax for this ?

hope you can help
unfortunately your dokumentation about the automation section isn't too extensive


You've got basically 3 fields you could use to match the device you want to attach to that Cisco - Catalyst 2960 Template

Code:
sysDescr = 1.3.6.1.2.1.1.1

So if you run an snmpget to one of your 2960s on that OID you'll get something like below.

Quote:
System: Cisco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version


sysName = 1.3.6.1.2.1.1.5.0

Idem above but will output system name, whatever you named your device.

You can also have it by going to Console\Management\Devices and click on one of the devices, right on the top you'll see it if cacti is able to snmp them.

Having said that, you can now make up your regexp to match sysName something like
Code:
^myswitchnamestartslikethis


And leave all the other ones blank, if that's enough or also match sysDescr with C2960

You get the idea. I'd post an screenshot but I don't use device rules. Graph rules is all I use at the moment.

Not sure what they do by default if you don't add regexp stuff but It'd be nice to have 3 basic criteria like 'starts with, ends with and contains'.

_________________
Cacti - 1.1.37
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
Code:
SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code:
WEATHERMAP STATS: Weathermap 0.98 run complete - Thu, 16 Nov 17 08:42:56 +1300: 39 maps were run in 23.22 seconds with 0 warnings.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group