Set API key for NagosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
nagwindmon
Posts: 92
Joined: Mon Dec 01, 2014 3:39 pm

Re: Set API key for NagosXI

Post by nagwindmon »

PM sent with requested info
Thanks!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Set API key for NagosXI

Post by tgriep »

The error when downloading the system profile is a permission issue or a missing / changed setting in the /etc/sudoers file. Take a look at this KB article to see if that fixed that issue.
https://support.nagios.com/kb/article/n ... ailed.html

Can you post or pm me the following file?

Code: Select all

/usr/local/nagiosxi/html/config.inc.php
As well as the output from this command run as root?

Code: Select all

ps -ef --cols=300
Be sure to check out our Knowledgebase for helpful articles and solutions!
nagwindmon
Posts: 92
Joined: Mon Dec 01, 2014 3:39 pm

Re: Set API key for NagosXI

Post by nagwindmon »

downloading the system profile issue has been resolved, System file has been pm'd
2 other pieces of info requested please see attached
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Set API key for NagosXI

Post by tgriep »

Your Nagios XI server is using the Postgres database so you woulld have to use this command to set the API key. Replace 1234567890 with the key you want to use.

Code: Select all

echo 'UPDATE xi_users SET backend_ticket = '123456780' WHERE user_id = 18;' | psql nagiosxi nagiosxi
Be sure to check out our Knowledgebase for helpful articles and solutions!
nagwindmon
Posts: 92
Joined: Mon Dec 01, 2014 3:39 pm

Re: Set API key for NagosXI

Post by nagwindmon »

well, good know, that worked!
So for NagiosXI ver 5.x.x and up would you suggest to convert from PostgreSQL to MySQL going forward?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Set API key for NagosXI

Post by dwhitfield »

Converting will be a painful process. If you want to just note in tickets/forum threads that you have postgres for the XI database that would be helpful. It's one of the reasons we ask for the full profile but when we check that we're mostly looking at /usr/local/nagiosxi/html/config.inc.php for determining postgres usage (running processes also useful). If mention your system has been upgraded from 2014, that will also be a clue.

That all said, are we ready to lock this up?
nagwindmon
Posts: 92
Joined: Mon Dec 01, 2014 3:39 pm

Re: Set API key for NagosXI

Post by nagwindmon »

Got it, Yes we're ready to lock it, as always appreciated your help guys!!
Locked