Page 1 of 1
Enabling API call from Nagios 2014R2.7
Posted: Tue Jul 26, 2016 3:42 am
by RIDS_I2MP
Hi Team,
We are using Nagios 2014R2.7 for monitoring different servers. Now we are trying to integrate Monitoring tool with a ticketing tools so API call needs to be initiated.
We are trying to hit the server Nagios server with username and API key so that in return we receive a XML file consisting of service status.
Kindly let us know how we can find the API key for any user and also how we can enable the API key if its not enabled.
Re: Enabling API call from Nagios 2014R2.7
Posted: Tue Jul 26, 2016 9:16 am
by lmiltchev
Go to: Admin->Manage Components->Backend API URL->select your user from the "User" drop-down menu->Apply Settings.
Copy the "Current Service Status" URL and paste it in the browser's address bar. You will find the API key (ticket) of the user at the end of the URL.
Example:
&username=test&ticket=0b6o4ukv0serk6jeq6ko9isn7sbl2qnv6tn9pb8q5jjnp65hbn9k939fuj4teoth
Re: Enabling API call from Nagios 2014R2.7
Posted: Thu Jul 28, 2016 6:16 am
by RIDS_I2MP
Team thanks for the help

Re: Enabling API call from Nagios 2014R2.7
Posted: Thu Jul 28, 2016 9:01 am
by mcapra
Is it alright if we lock this thread and mark the issue as resolved?
Re: Enabling API call from Nagios 2014R2.7
Posted: Wed Aug 24, 2016 4:43 am
by RIDS_I2MP
Hi Team,
Whenever we are hitting the Nagios Backend API URLs(production /non production) to the respective servers for generating the XMLs,The XML is having the Nagios Login passwords and database passwords as well.
Can we hide this password? So that whenever we hit the API URL the XML should encrypt the passwords.
Re: Enabling API call from Nagios 2014R2.7
Posted: Wed Aug 24, 2016 10:08 am
by lmiltchev
The Backend API URL component is deprecated. I don't believe we are going to work on it, i.e. encrypt passwords, etc. I would recommend upgrading your Nagios XI instance. In the "new" REST API passwords are not shown. Example:
Code: Select all
"users": [
{
"user_id": "52",
"username": "testingnew123",
"name": "Test User",
"email": "test@localhost",
"enabled": "1"
},
Re: Enabling API call from Nagios 2014R2.7
Posted: Thu Aug 25, 2016 8:54 am
by RIDS_I2MP
Do you mean that updated Nagios will encrypt the password in the XML file?
XML file consist "nagiosadmin" password i.e. Nagios login password?
Re: Enabling API call from Nagios 2014R2.7
Posted: Thu Aug 25, 2016 10:10 am
by lmiltchev
Can you show us an example of a XML file, where the password is shown (visible), and the URL that you used to access the data? Hide sensitive info.