Page 1 of 1
add new users to Nagios XI web interface
Posted: Mon Mar 13, 2017 12:34 pm
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!
Re: add new users to Nagios XI web interface
Posted: Mon Mar 13, 2017 1:27 pm
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.