Hi Team,
Is there a way that I can disable all notifications in nagios xi using an api call by passing the token instead of giving username and password?
The command which works fine at the moment is below:
curl -u USER:PASS "http://<NAGIOSXI>/nagios/cgi-bin/cmd.cgi?cmd_mod=2&cmd_typ=11"
I want to execute above command using an api token that is provided by nagiosxi for every user.
Thanks,
Madhu.
Nagios XI Disabling Notifications via API
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios XI Disabling Notifications via API
See the Help -> API Docs -> System -> system/corecommand
Use DISABLE_NOTIFICATIONS passed ad the cmd
example
Command reference
https://assets.nagios.com/downloads/nag ... mmand_id=7
Use DISABLE_NOTIFICATIONS passed ad the cmd
example
Code: Select all
curl -XPOST "http://192.168.5.xx/nagiosxi/api/v1/system/corecommand?apikey=API_KEY" -d "cmd=DISABLE_NOTIFICATIONS"Command reference
https://assets.nagios.com/downloads/nag ... mmand_id=7