Enabling API call from Nagios 2014R2.7

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Enabling API call from Nagios 2014R2.7

Post 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.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Enabling API call from Nagios 2014R2.7

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Enabling API call from Nagios 2014R2.7

Post by RIDS_I2MP »

Team thanks for the help :)
Thanks & Regards,
I2MP Team.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Enabling API call from Nagios 2014R2.7

Post by mcapra »

Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Enabling API call from Nagios 2014R2.7

Post 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.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Enabling API call from Nagios 2014R2.7

Post 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"
        },
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Enabling API call from Nagios 2014R2.7

Post 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?
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Enabling API call from Nagios 2014R2.7

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked