I have about 300 servers and Nagios Core 4.2.4
At one point I did have a small number of services, and utilized groups. The problem I ran in to is that a vast majority of these servers desire different thresholds. So having say 90% use of "/app" for Warning and 95% for Critical, doesnt apply to all servers. It became easier for me to just have a unique service for each "/app" check (I use ncpa) for each host, each stored in their own separate hostname.cfg file. I know this is large and cumbersome, but otherwise, individual tweaking of a specific host was a hassle.
Can you please provide some SME best practice recommendation? Am I doing this wrong? Making life harder on myself? Is there a way to define one service for "/app" monitoring for example, but yet specify unique thresholds for each host?
Best practice recommendation on Service reuse
Re: Best practice recommendation on Service reuse
Is using custom variables to store it an option for you? This would allow dynamic configuration, and allow you to continue to use templates for your checks.
https://assets.nagios.com/downloads/nag ... tvars.html
https://assets.nagios.com/downloads/nag ... tvars.html
Former Nagios Employee
Re: Best practice recommendation on Service reuse
Yes, these look like they would work perfectly. It would mean that I could reduce the # of services down to probably 1 for each type. I would need to define similar custom variables though for each host. I dont know if this is simply a different way of doing what I am already doing or a better way at doing it. If it is simply a different way, then having say 300 services all that check the same filesystem, but different thresholds (not every one is different, but this approach allowed flexibility) for each.
This approach may possibly be a little easier in the long run if changes needed to be made to the service, for example a real custom scripted one that I later on enhanced and didnt want to make that change 300 different places. You know?
Thank you.
This approach may possibly be a little easier in the long run if changes needed to be made to the service, for example a real custom scripted one that I later on enhanced and didnt want to make that change 300 different places. You know?
Thank you.
Re: Best practice recommendation on Service reuse
Yup - that brings up another thought over here. You could develop wrappers around your plugins, that dynamically checked what thresholds should be set based on any string of data you want. (perhaps, hostnames, or IP address) Then, depending how it matches up, have it run the thresholds accordingly.
If you have any thoughts for something that could be built into NCPA, feel free to bring it up here - https://github.com/NagiosEnterprises/ncpa/issues
If you have any thoughts for something that could be built into NCPA, feel free to bring it up here - https://github.com/NagiosEnterprises/ncpa/issues
Former Nagios Employee
Re: Best practice recommendation on Service reuse
Just checking in since we have not heard from you in a while. Did @rkennedy's post clear things up or has the issue otherwise been resolved?
Former Nagios employee
Re: Best practice recommendation on Service reuse
It makes sense. I haven't done anything yet. Just other priorities. You can resolve it. Thanks a lot guys