Hello,
I'm a new user of nagios and I don't know how to send global alarm to a Hypervisor.
For exemple, I have 10 switchs supervised by Nagios. On Nagios, I have the detailled alarms and states. Each switchs is in a hostgroup (switch group)
Now, I would like to send a unique alarm of the global state of switchs to a hypervisor (Not nagios) like "Critical state on the network" regardless of the alarm or switch.
If I have a power supply alarm or a cpu alarm, I would like a unique critical alarm on the hypervisor.
I tried using the event handler on each with a bash script but I don't know if it's the better way and If it's possible.
Maybe can I monitor Nagios hostgroup via snmp request?
Thank you for your help
How to send general alarm to a Hypervisor?
Re: How to send general alarm to a Hypervisor?
Are you trying to get this alarm triggered when something changes states? If so, event handlers is probably the way to go. From the sounds of how you brought it up though, I took it as you want to be able to trigger this with a button.Now, I would like to send a unique alarm of the global state of switchs to a hypervisor (Not nagios) like "Critical state on the network" regardless of the alarm or switch.
As you're using Nagios XI - I would look at the 'Help' menu, which will outline how to use the API to poll for information. From here, you could create a simple bash script to curl the various hosts / services information you're after, and have it parse the JSON accordingly.
Another option is as you mentioned, use hostgroups / servicegroups to organize. One thing you could do from here, is scheduled a report to be sent of the 'Service Status Page' for a hostgroup / servicegroup, which would allow you to see all of the information in one place.
Former Nagios Employee
Re: How to send general alarm to a Hypervisor?
Thank you for your reply rkennedy,
I'm trying to make scheduled reports but it's a PDF or CSV, I will prepare to send a report at each hostgroup state change as an snmptrap to my hypervisor
I'm trying to make scheduled reports but it's a PDF or CSV, I will prepare to send a report at each hostgroup state change as an snmptrap to my hypervisor
Re: How to send general alarm to a Hypervisor?
Another thing I'm thinking about it's from my hypervisor I send snmp request to nagios to catch the informations in the Hostgroup Summary.
Cause in the Hostgroup summary, I have a tab with all I need. (see attachment)
Is It possible to have this informations by snmp request ? I didn't find the MIB for nagiosxi server.
Cause in the Hostgroup summary, I have a tab with all I need. (see attachment)
Is It possible to have this informations by snmp request ? I didn't find the MIB for nagiosxi server.
You do not have the required permissions to view the files attached to this post.
Re: How to send general alarm to a Hypervisor?
Hostgroups do not change states so I'm a bit confused here. The scheduled reports are intended to run at an interval, and not a trigger.Killride wrote:Thank you for your reply rkennedy,
I'm trying to make scheduled reports but it's a PDF or CSV, I will prepare to send a report at each hostgroup state change as an snmptrap to my hypervisor
Which information are you after through a trap - the number of OK/WARN/CRIT variables under hosts / services for x host group? Just want to make sure I'm understanding properly, and we're on the same page.Killride wrote:Another thing I'm thinking about it's from my hypervisor I send snmp request to nagios to catch the informations in the Hostgroup Summary.
Cause in the Hostgroup summary, I have a tab with all I need. (see attachment)
Is It possible to have this informations by snmp request ? I didn't find the MIB for nagiosxi server.
Former Nagios Employee
Re: How to send general alarm to a Hypervisor?
My bad, I would like to send a snmp request from my hypervisor to nagios to return the number of OK/WARN/CRIT variables under hosts / services for each hostgroups. I don't know if it's possible to do that.
Re: How to send general alarm to a Hypervisor?
Our back-end API could be used to accomplish that task, though I doubt it would integrate easily with your existing hypervisor's management portal. Our API will return JSON and could handle complex queries like "state = critical AND hostgroup = my-host-group". You can review the API documentation in the "Help" section of the Nagios XI GUI.Killride wrote:I would like to send a snmp request from my hypervisor to nagios to return the number of OK/WARN/CRIT variables under hosts / services for each hostgroups.
EDIT: On the topic of SNMP specifically, you might also reference these talks held at past Nagios conferences:
https://support.nagios.com/kb/article.php?id=451
https://library.nagios.com/library/conf ... rt-bolton/
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: How to send general alarm to a Hypervisor?
Thank you mcapra,
I checked the API Documentation and this is what I need. The only thing is that return a XML files so I have to create a script who parse the xml file and send a snmp trap to the hypervisor cause my hypervisor only works with snmp.
Do you have anothers suggestions about that?
I checked the API Documentation and this is what I need. The only thing is that return a XML files so I have to create a script who parse the xml file and send a snmp trap to the hypervisor cause my hypervisor only works with snmp.
Do you have anothers suggestions about that?
Re: How to send general alarm to a Hypervisor?
That sounds correct - parsing the XML will allow you to gain the metrics you're after for the payload.
Former Nagios Employee
Re: How to send general alarm to a Hypervisor?
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