Page 1 of 1
How to Read the received alert from Nagios DataBase
Posted: Sun Feb 18, 2018 4:29 am
by shtrudhan
Hi Team,
I have a requirement where need to incoming event from database from different application. Please let me know where the data base stored and how to read it.
Regards
Shtrudhan
Re: How to Read the received alert from Nagios DataBase
Posted: Mon Feb 19, 2018 10:34 am
by mcapra
Nagios Core's database (which is less "database" and more ORM) is in-memory and inaccessible.
Nagios XI uses a MariaDB database.
That said, if you want to programatically pull a specific piece of information out of Nagios Core, the JSON CGIs exist:
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/
From that documentation, assuming you are using the latest version of Nagios Core, you can skip to the "To get started using the CGIs" section.
Or, if you want to manually submit checks to Nagios Core,
passive checks are a good option for this.
Re: How to Read the received alert from Nagios DataBase
Posted: Mon Feb 19, 2018 1:53 pm
by kyang
Thanks for the help
@mcapra!
shtrudhan, let us know if you have any more questions.
Re: How to Read the received alert from Nagios DataBase
Posted: Wed Feb 21, 2018 5:13 am
by shtrudhan
Thank you. when i open the json query generator page, the Send Query is disabled. Could you please help me to resolve this
Re: How to Read the received alert from Nagios DataBase
Posted: Wed Feb 21, 2018 2:42 pm
by mcapra
Please refer to the documentation I have provided:
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/
You'll need to select the relevant CGI for the information you're trying to access. Here's an example of generating a query for the status of host CENESPROD00:
Notice how I have selected the "Status JSON CGI".
Re: How to Read the received alert from Nagios DataBase
Posted: Wed Feb 21, 2018 4:58 pm
by kyang