Page 1 of 1

Change Thresholds for Interface Bandwidth and best practices

Posted: Fri Mar 16, 2018 6:12 am
by adminskymed
Hi All,

I'm a new user and I don't understand lot of thing in nagios xi configuration.
Reading the documentation seems that Wizard are the best way to monitor devices and I tried them and they are really great but...
it seems to me that using Wizard in a big environment is a suicide.
I make you an example.
I use wizard to monitor 50 switches... in few minutes I have all my switch and all the interface bandwidth (about 2000 interfaces) under monitoring: fantastic.
Well, my boss decided to change threshold for the bandwidth from 80% to 90% and change comunity from public to someothercomunityname,
If I am not wrong, using Wizards, now I should go to any one of the 2000 interfaces if I want to change comunity and threshold!!! Is it right?
How can I avoid this? What is the best way to proceed if you are starting to monitor a big environment and you don't want to be mad anytime you need to change something?

Thanks
Alex

Re: Change Thresholds for Interface Bandwidth and best pract

Posted: Fri Mar 16, 2018 1:52 pm
by cdienger
If you have the Enterprise Edition then the bulk modification tool can be used: https://support.nagios.com/kb/article/n ... l-733.html

Re: Change Thresholds for Interface Bandwidth and best pract

Posted: Mon Mar 19, 2018 8:14 am
by adminskymed
Hello, thanks for your reply.
Bulk is a cool and powerful tool, thanks.
I wonder If I can work using service template, instead of bulk tool.
For instance I need to monitor Bandwidth and I want to able to change threshold for all interfaces in the future if needed,
can i do it using service template?
I saw that the template for interface bandwidth is xiwizard_switch_port_bandwidth_service, can I do a copy and work on it?
I wonder why this template doesn't have a command associated... can someone explain me if and how can i monitor interfaces bandwidth using templates?
Is there any documentation about service templates and how to properly use them?

Thanls

Re: Change Thresholds for Interface Bandwidth and best pract

Posted: Mon Mar 19, 2018 3:24 pm
by cdienger
Templates are not really a good option in this case. One of the arguments in this check command is a file name unique to the host and interface(/var/lib/mrtg/192.168.4.14_2.rrd) for example. This isn't a good place to set this other than on the individual checks.

Required fields can be left blank in configs and templates if those fields are inherited from a template. Both https://assets.nagios.com/downloads/nag ... gement.pdf and https://assets.nagios.com/downloads/nag ... tance.html would be good reads regarding this.

Re: Change Thresholds for Interface Bandwidth and best pract

Posted: Tue Mar 20, 2018 3:07 am
by adminskymed
Thank you very much for your reply.
As you can image I'm moving my first steps in Nagios XI and I'm studying how it works.
In our company we are moving from another monitoring tool to nagios, so I'm trying to replicate common activities in monitoring systems with nagios and it seems to me very complicated to do easy change as I did in our old monitoring tool (but i think that at this point it is normal, i'm almost sure that in a month i will see it with new eyes).
Interface bandwidth is my first test of monitoring and after a week I still didn't have understand how I can change threshold value or snmp community in all interface without doing it one by one.
Reading your replies it seems that templates are not a good idea and so i should use bulk, isn't it? How can I use bulk in this case?
Do I have to do "Change Command and Arguments" and find out which command is used for interface bandwidth and then change arguments? or what?

Sorry if they seems to be silly questions, but I have to put under nagios about 500 devices and before ordering enterprise version I need to be sure that I can manage normal changes in monitoring easily.

Re: Change Thresholds for Interface Bandwidth and best pract

Posted: Tue Mar 20, 2018 4:39 pm
by cdienger
Taking another look at it, the bulk modification tool has the same problem that templates have - it cannot change just a single argument. Sorry for the misinformation. I had heard about this before and have had a requests to change this in feature request but hadn't realized it still functioned in this manner.

The items like threshold can done by making copies of the service config files, modifying them (by script to make it quicker) and then uploading them again. Uploading(including instructions) can be found under Configure > Tools > Import Config files.

The community string can be modified by editing the respective config files under /etc/mrtg/conf.d/. For example, my lab machine connects to a device using the public community which is defined with this line in /etc/mrtg/conf.d/192.168.4.55.cfg:

Target[192.168.4.55_2]: 2:[email protected]:161::::2

Re: Change Thresholds for Interface Bandwidth and best pract

Posted: Wed Mar 21, 2018 8:33 am
by adminskymed
Thank you, editing config files I am able to modify thresholds and community.

Re: Change Thresholds for Interface Bandwidth and best pract

Posted: Wed Mar 21, 2018 10:12 am
by tmcdonald
Glad to hear it! Are we alright to close this up then?

Re: Change Thresholds for Interface Bandwidth and best pract

Posted: Thu Mar 22, 2018 3:12 am
by adminskymed
yes, it can be closed, thanks

Re: Change Thresholds for Interface Bandwidth and best pract

Posted: Thu Mar 22, 2018 10:38 am
by kyang
Sounds good!

Thanks for using the Nagios Support Forums!

Feel free to create a new thread if you have any more issues.

Have a great day!