Auto Create SNMP Interface Statistics? Like a template?
Moderators: Developers, Moderators
Auto Create SNMP Interface Statistics? Like a template?
So, I really did search a lot on these forums - and if I missed the answer somewhere I am sorry - but:
Is is possible upon Host Creation (lets say using a graph template and a device template) - can you auto create an "SNMP Interface Statistics" graph?
Like one of these when you click on "Create graphs after you add a host": I was kinda hoping to auto create: "In/Out Bits with 95th Percentile" and "In/Out Errors/Discarded Packets" - on at least IF Index 1 (and maybe 2) - It will show up as eth0 or eth1_emac1 - so IF index is prolly best.
I was trying to do this with a device template - where I can create / add all sorts of useful graphs etc - but never interface graphs!
Also, (And this is really annoying to me) - being able to re-order graph templates would be nice as they show up in alphabetical order and show up that way when added to a tree. (Kinda lazy so I dot want to re-arrange them after they are created)
I mention graph templates as I think that a clue may be in graph templates - but never see an option to create an interface graph. (I should always know the interface if using a device template).
Thanks for any suggestions / encouragement - heck even discouragement (there is no way to do what I ask) that some of you may be able to provide!
Is is possible upon Host Creation (lets say using a graph template and a device template) - can you auto create an "SNMP Interface Statistics" graph?
Like one of these when you click on "Create graphs after you add a host": I was kinda hoping to auto create: "In/Out Bits with 95th Percentile" and "In/Out Errors/Discarded Packets" - on at least IF Index 1 (and maybe 2) - It will show up as eth0 or eth1_emac1 - so IF index is prolly best.
I was trying to do this with a device template - where I can create / add all sorts of useful graphs etc - but never interface graphs!
Also, (And this is really annoying to me) - being able to re-order graph templates would be nice as they show up in alphabetical order and show up that way when added to a tree. (Kinda lazy so I dot want to re-arrange them after they are created)
I mention graph templates as I think that a clue may be in graph templates - but never see an option to create an interface graph. (I should always know the interface if using a device template).
Thanks for any suggestions / encouragement - heck even discouragement (there is no way to do what I ask) that some of you may be able to provide!
Re: Auto Create SNMP Interface Statistics? Like a template?
Automation > Graph Rules
There is already a rule by default that will create interface graphs.
There is already a rule by default that will create interface graphs.
- Attachments
-
- Screenshot_10.png (9.26 KiB) Viewed 2898 times
Re: Auto Create SNMP Interface Statistics? Like a template?
Thanks for this - but how in the world do you take one of these and add it to a device template?
Lets say we want to add "Interface - Traffic (bits/sec, 95th Percentile)" to a device template.
There is no way that I see to add it to a graph template and then have that graph template be part of a device template?
Perhaps I am going about this the wrong way.
I have used Cacti for years - but have never played with the automation side - so there must be somethings that I am missing.
For reference I am using : Version 1.2.19
It is like there are not "Interface*" graph templates available to device templates: Or:
Lets say we want to add "Interface - Traffic (bits/sec, 95th Percentile)" to a device template.
There is no way that I see to add it to a graph template and then have that graph template be part of a device template?
Perhaps I am going about this the wrong way.
I have used Cacti for years - but have never played with the automation side - so there must be somethings that I am missing.
For reference I am using : Version 1.2.19
It is like there are not "Interface*" graph templates available to device templates: Or:
Re: Auto Create SNMP Interface Statistics? Like a template?
So, I also realize (now) that "automation" is seems to really be intended for hosts that exist or are being added automatically?
"https://docs.cacti.net/Graph-Rules.md"
"Graph rules are used by the Cacti automation process after a device has been identified and a template has been applied...."
So dont think that this will help in my endeavor....
"https://docs.cacti.net/Graph-Rules.md"
"Graph rules are used by the Cacti automation process after a device has been identified and a template has been applied...."
So dont think that this will help in my endeavor....
Re: Auto Create SNMP Interface Statistics? Like a template?
So, Ill provide an update for folks that look at this "years" from now - but it looks like the automation thing might work.
Basically what I did was under: Automation -> Graph Rules. I created a rule (Graph Creation Criteria) that :
1. Looks for "ifIndex - Index" that "matches" 1 and another for 2.
The idea being that upon creation these devices will always have an ifIndex of 1 and 2. IE eth0 and eth1
2. I created some further rules (Device Selection Criteria) that check for SNMP community (AND) check for location - Then had a heck of a time - but location 1 (OR) location 2 (OR) location etc... (Have like 15 locations).
To make this work I had to add items with the "Operation" field blank for the first selection (SNMP Community), then create an empty item with the "Operation" being AND - then the next "Operation" being "(" - then an "Operation" of the 1st location and the next "Operation" and the rest being "OR". The last Item I added was the "Operation" for ")" to close the location match section.
Clicking on "*Show Matching Devices." Shows all of the devices I have already assigned to locations.
So, I am hoping that when I create a new device (as long as I assign it to an existing location) - it will go an create a graph for me that I specified.
Ill update more as I get this working - wish me luck!
Basically what I did was under: Automation -> Graph Rules. I created a rule (Graph Creation Criteria) that :
1. Looks for "ifIndex - Index" that "matches" 1 and another for 2.
The idea being that upon creation these devices will always have an ifIndex of 1 and 2. IE eth0 and eth1
2. I created some further rules (Device Selection Criteria) that check for SNMP community (AND) check for location - Then had a heck of a time - but location 1 (OR) location 2 (OR) location etc... (Have like 15 locations).
To make this work I had to add items with the "Operation" field blank for the first selection (SNMP Community), then create an empty item with the "Operation" being AND - then the next "Operation" being "(" - then an "Operation" of the 1st location and the next "Operation" and the rest being "OR". The last Item I added was the "Operation" for ")" to close the location match section.
Clicking on "*Show Matching Devices." Shows all of the devices I have already assigned to locations.
So, I am hoping that when I create a new device (as long as I assign it to an existing location) - it will go an create a graph for me that I specified.
Ill update more as I get this working - wish me luck!
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Auto Create SNMP Interface Statistics? Like a template?
It does work.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Auto Create SNMP Interface Statistics? Like a template?
So, is there a way to "exclude" devices / IP's when doing automation?
Like I dont need the gateways: Once I get this all figured out - I promise to write up the steps - so they are all in one place!
Like I dont need the gateways: Once I get this all figured out - I promise to write up the steps - so they are all in one place!
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Auto Create SNMP Interface Statistics? Like a template?
Just become familiar with booleans and the SQL NOT operator.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Auto Create SNMP Interface Statistics? Like a template?
Gorsh -
hahahahah
hahahahah
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Auto Create SNMP Interface Statistics? Like a template?
Well, there all those stories about horses and water. You'd be surprised how many people just don't get it, and just want their everlasting gobstopper and want it now.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Auto Create SNMP Interface Statistics? Like a template?
Ahmen brother - More to come from me in a few days.
Re: Auto Create SNMP Interface Statistics? Like a template?
So, a few days, a few weeks - whatever - I am putting up a follow up post!
Here is the break down of how I got this all to work the way I wanted it to (Some repeat - but new info) :
I had previously set up custom device templates for the devices that I am setting up.
Basically what I did was under: Automation -> Graph Rules. I created a rule (Graph Creation Criteria) that :
1. Looks for "ifIndex - Index" that "matches" 1 and another for 2.
The idea being that upon creation these devices will always have an ifIndex of 1 and 2. IE eth0 and eth1
2. I created some further rules (Device Selection Criteria) that check for SNMP community (AND) check for location - Then had a heck of a time - but location 1 (OR) location 2 (OR) location etc... (Have like 15 locations).
Two sets of these Graph Rules where created:
"Create 95th Percentile Graph"
"Create Interface Errors Graph"
3. When adding a new CPE radio device - these will create graphs for interface's 1 and 2 "if" they are UP.
At the end of the day - I have:
Device creation that is manual (That way I can name it / choose the location and set the IP myself) - This actually saves me some time not having to audit and delete devices that dont really need to be in there.
Upon device creation - it will create graphs for all of the stuff that I want to graph. I had to name them 1A, 2B etc to be able to get them "ordered" in a way that I wanted them to appear on the graph tree. The automation will also create Interface graphs for errors and 95th %tile bandwidth usage.
Then once I create a device all graphs are populated, and I can place it in the correct tree and sort it by (our) ID field.
Yes, I prolly should take some more time to fully automate it - but this works and cuts the workload down to 5 min as opposed to 25 min to create the device, name it / make all of the graphs and place it on a tree in the correct order.
Here is the break down of how I got this all to work the way I wanted it to (Some repeat - but new info) :
I had previously set up custom device templates for the devices that I am setting up.
Basically what I did was under: Automation -> Graph Rules. I created a rule (Graph Creation Criteria) that :
1. Looks for "ifIndex - Index" that "matches" 1 and another for 2.
The idea being that upon creation these devices will always have an ifIndex of 1 and 2. IE eth0 and eth1
2. I created some further rules (Device Selection Criteria) that check for SNMP community (AND) check for location - Then had a heck of a time - but location 1 (OR) location 2 (OR) location etc... (Have like 15 locations).
Two sets of these Graph Rules where created:
"Create 95th Percentile Graph"
"Create Interface Errors Graph"
3. When adding a new CPE radio device - these will create graphs for interface's 1 and 2 "if" they are UP.
At the end of the day - I have:
Device creation that is manual (That way I can name it / choose the location and set the IP myself) - This actually saves me some time not having to audit and delete devices that dont really need to be in there.
Upon device creation - it will create graphs for all of the stuff that I want to graph. I had to name them 1A, 2B etc to be able to get them "ordered" in a way that I wanted them to appear on the graph tree. The automation will also create Interface graphs for errors and 95th %tile bandwidth usage.
Then once I create a device all graphs are populated, and I can place it in the correct tree and sort it by (our) ID field.
Yes, I prolly should take some more time to fully automate it - but this works and cuts the workload down to 5 min as opposed to 25 min to create the device, name it / make all of the graphs and place it on a tree in the correct order.
Re: Auto Create SNMP Interface Statistics? Like a template?
Here is an example of my graph creation
But I have easy criteria on interface to recognize them, not based on index (who can change by the way on some reboot)
As for the device selection, I'm just using sysdescr, and remove some deviec matching a name.
But I have easy criteria on interface to recognize them, not based on index (who can change by the way on some reboot)
As for the device selection, I'm just using sysdescr, and remove some deviec matching a name.
- Attachments
-
- automation graph.pdf
- (203 KiB) Downloaded 82 times
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Who is online
Users browsing this forum: No registered users and 1 guest