Admin permissions needed for API downtime

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
optionstechnology
Posts: 233
Joined: Thu Nov 17, 2016 11:26 am

Admin permissions needed for API downtime

Post by optionstechnology »

The ability to add scheduled downtime via the API is limited to full admin accounts

But normal non-admin users have the ability to set downtime via the front end

Can we get the permissions changed on this function in the API?

I frequently have to grant access to 3rd parties to allow them to programmatically downtime their services and the only way I can do this is to give them full admin access
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Admin permissions needed for API downtime

Post by pbroste »

Hello @optionstechnology

Thanks for reaching out on sending downtime via API.

I ran the test command to schedule downtime via API using two 'admin users' using API keys associated and find that the command successfully completed in both cases.

Code: Select all

curl -XPOST "https://xxx.xxx.xxx.xxx/nagiosxi/api/v1/system/scheduleddowntime?apikey=AEiMFttHuQRqWEDbqgXYelB6GPCakE3F7i6CKQsNIMoAS9Pcol3eE3Ohe5fjYUGH&pretty=1" -d "comment=Test downtime creation&start=1631647944&end=1631655144&hosts[]=localhost" -k
{
    "success": "Schedule downtime command(s) sent successfully.",
    "scheduled": {
        "hosts": [
            "localhost"
        ]
    }
}
[root@localhost ~]# curl -XPOST "https://xxx.xxx.xxx.xxx/nagiosxi/api/v1/system/scheduleddowntime?apikey=iIIcpAegUHQqa0QqOKk9Cn8LXPE7rDEEANWriIscHnVUFVe3S4Z38bE5Y7FJE8rL&pretty=1" -d "comment=Test downtime creation&start=1631647944&end=1631655144&hosts[]=localhost" -k
{
    "success": "Schedule downtime command(s) sent successfully.",
    "scheduled": {
        "hosts": [
            "localhost"
        ]
    }
}
That leads me to my next question, what Nagios XI version are you on?

Also, what do you see for "authorizated_for_configuration_information" in cgi.cfg?

Code: Select all

grep -Eir 'authorized_for_configuration_information' /usr/local/nagiosxi/nom/checkpoints/nagioscore/*/cgi.cfg
  • I see listed: =nagiosadmin,nagiosadmin,myaliasid
Thanks,
Perry
Locked