Nagios XI Disabling Notifications via API

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
madhu2852
Posts: 50
Joined: Mon Aug 28, 2017 1:13 pm

Nagios XI Disabling Notifications via API

Post by madhu2852 »

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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Disabling Notifications via API

Post by scottwilkerson »

See the Help -> API Docs -> System -> system/corecommand

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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked