NagiosXI API system/scheduleddowntime author parameter

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
wbaars
Posts: 9
Joined: Tue Jul 05, 2016 6:05 am

NagiosXI API system/scheduleddowntime author parameter

Post by wbaars »

Since we upgrade our Nagios XI to 5.5, I'm trying to use the API to set scheduleddowntime.

I can schedule a downtime (via Powershell) correctly by using an API Key, but when I use the API Key from a special created admin account, and set the "author" parameter, the author for the downtime (in the webui and API) is still the user the API key belongs to.


A small piece of my Powershell code:

Code: Select all

$author = "exampleuser"

$uri = "http://$nagsrv/nagiosxi/api/v1/system/scheduleddowntime?apikey=$apikey"
$body = "author=$author&comment=$comment&all_services=1&duration=$duration&start=$starttime&end=$endtime&hosts[]=$hostname"

$downtimejson = Invoke-RestMethod -Uri $uri -Method Post -Body $body
Has anyone seen this before? Is there a way to get this working? Or am I doing something wrong?

PS: We have a licensed NagiosXI install, but cannot post in the Customer section on this forum.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI API system/scheduleddowntime author parameter

Post by scottwilkerson »

Is "exampleuser" an actual username of a user on your system? It must match a username exactly
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI API system/scheduleddowntime author parameter

Post by scottwilkerson »

Actually looking into this, it does appear to be a bug.

I am submitting a bug report to get this resolved in a future release
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
wbaars
Posts: 9
Joined: Tue Jul 05, 2016 6:05 am

Re: NagiosXI API system/scheduleddowntime author parameter

Post by wbaars »

Thanks for looking into this issue. Happy it's not my fault :)
My script retrieves the correct username from the system, the username does match.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI API system/scheduleddowntime author parameter

Post by scottwilkerson »

wbaars wrote:Thanks for looking into this issue. Happy it's not my fault :)
My script retrieves the correct username from the system, the username does match.
This should be resolved in the next release of Nagios XI
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
wbaars
Posts: 9
Joined: Tue Jul 05, 2016 6:05 am

Re: NagiosXI API system/scheduleddowntime author parameter

Post by wbaars »

I updated last week, and verified this issue is solved in NagiosXI 5.6.1.
Thanks!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI API system/scheduleddowntime author parameter

Post by scottwilkerson »

wbaars wrote:I updated last week, and verified this issue is solved in NagiosXI 5.6.1.
Thanks!
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked