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
NagiosXI - schedule reports and other config via "API"
-
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"
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.
Re: NagiosXI - schedule reports and other config via "API"
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:
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.
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"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!