add new users to Nagios xi web interface

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

add new users to Nagios xi web interface

Post by xlin125 »

We have Nagios xi 2014R2.7 and Nagios xi 5.x installed on Redhat 6.x and 7.x. Currently, we add new users to the Nagios xi web interface manually via the Nagios xi web interface. We are looking for a solution that we can automate this process of adding new users to the database by accessing the database directly (e.g., run sql scripts/commands). If you have such information, please share with us. Thanks!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: add new users to Nagios xi web interface

Post by lmiltchev »

You can use the new REST API to add users.

Example:

Code: Select all

curl -XPOST "http://x.x.x.x/nagiosxi/api/v1/system/user?apikey=LTltbjobR0X3V5ViDIitYaI8hjsjoFBaOcWYukamF7oAsD8lhJRvSPWq8I3PjTf7&pretty=1" -d "username=jmcdouglas&password=test&name=Jordan%20McDouglas&email=jmcdouglas@localhost"
{
    "success": "User account jmcdouglas was added successfully!",
    "userid": 13
}
The REST API documentation is available in the Nagios xi web UI, under the "Help" menu.

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!