NagiosXI - schedule reports and other config via "API"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
zarkomd
Posts: 1
Joined: Tue Oct 04, 2016 2:46 pm

NagiosXI - schedule reports and other config via "API"

Post by zarkomd »

Hi All,

In general is there an API of some sort that I can use to configure NagiosXI?
Im trying to automate user creating, reports sending for the new users etc... so that I dont need to logon to the gui to do that.

But those settings aren't in any cfg files, like for the hosts, contacts, services...

Thanks,
Zarko
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NagiosXI - schedule reports and other config via "API"

Post by dwhitfield »

You'll find "Backend REST API" information at https://support.nagios.com/kb/article.php?id=176. The "Backend API" will not do what you want it to do. Please let us know if you have any additional questions.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI - schedule reports and other config via "API"

Post by lmiltchev »

To add to what @dwhitfield said - this is "partially" possible. You can add users via the REST API, however, you cannot create reports, and add them to these users, at least not yet.

Example of adding users:

Code: Select all

curl -XPOST "http://x.x.x.x/nagiosxi/api/v1/system/user?apikey=xxx&pretty=1" -d "username=robertdeniro&password=test&name=Robert%20De%20Niro&email=robertdeniro@localhost&auth_level=admin&monitoring_contact=1"
{
    "success": "User account robertdeniro was added successfully!",
    "userid": "5"
example01.PNG
To view the REST API usage, go to the "Help" menu in Nagios XI, then click on "Backend API Docs".

As for the reports, I could add an internal feature request if you want me to. I know that we are going to add a lot more functionality to the REST API, so this could be added as well.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked