NagiosXI and Python script
Posted: Tue Oct 28, 2014 2:07 pm
Hello!
I’m very new to Nagios and I spent the day studying how to best implement my Python plugin. I was able to run a NagioxIX virtual machine using VirtualBox, and now I am trying to understand how to build my plugin.
REQUIREMENTS:
I need to integrate into Nagios some alerts coming from my own monitoring tool. I have a Python library that queries my own monitoring tool (REST based via HTTPS), so I need to have this information displayed into Nagios.
I understood that Nagios is basically a monitoring server, so in order to have info pushed into its dashboard, I need to set up a Linux client where to run the Python script. I found this NRPE add ons that looks like what I need, since the NRPE is also able to to http_check (so would be ok with my REST based query to my monitoring tool):
So using the example in the following link, I managed to have the data from my own tool, queried via Python script, displayed into Nagios dashboard:
https://www.digitalocean.com/community/ ... untu-12-10
Alternatively, I can run the Python script directly on the Nagios server as explained here:
http://skipperkongen.dk/2011/12/06/hell ... in-python/
-----------------------------
QUESTION: What are the pros/cons of each of the two solutions?
-----------------------------
Thanks!
Wally
I’m very new to Nagios and I spent the day studying how to best implement my Python plugin. I was able to run a NagioxIX virtual machine using VirtualBox, and now I am trying to understand how to build my plugin.
REQUIREMENTS:
I need to integrate into Nagios some alerts coming from my own monitoring tool. I have a Python library that queries my own monitoring tool (REST based via HTTPS), so I need to have this information displayed into Nagios.
I understood that Nagios is basically a monitoring server, so in order to have info pushed into its dashboard, I need to set up a Linux client where to run the Python script. I found this NRPE add ons that looks like what I need, since the NRPE is also able to to http_check (so would be ok with my REST based query to my monitoring tool):
So using the example in the following link, I managed to have the data from my own tool, queried via Python script, displayed into Nagios dashboard:
https://www.digitalocean.com/community/ ... untu-12-10
Alternatively, I can run the Python script directly on the Nagios server as explained here:
http://skipperkongen.dk/2011/12/06/hell ... in-python/
-----------------------------
QUESTION: What are the pros/cons of each of the two solutions?
-----------------------------
Thanks!
Wally