Page 1 of 1

Nagios XI - API to Update Macro Passwords

Posted: Thu Jan 23, 2020 1:18 pm
by bsanjay
Hello Team,
We are trying to automate some process like changing macro values or passwords in Nagios XI. Please let us know if there is any API available to achieve this functionality.

Let's say , if I have a one service monitoring which is using macro $USER8$ and one plain password as part of Nagios check. If some day this password changes on remote DB Server then instead of manually changing both the macro value and plain password in Nagios XI check, I want to invoke some API and update this passwords automatically.

Example Nagios Check:
/usr/local/nagios/libexec/check_oracle_health --connect 'mydbserver:8822/prfc' --username $USER8$ --password secondpassword --mode connection-time --warning 1 --critical 5

$USER8$=firstpassword
Plain Password = secondpassword


Please let me know in case of any queries.

Best Regards,
BSanjay

Re: Nagios XI - API to Update Macro Passwords

Posted: Thu Jan 23, 2020 4:59 pm
by benjaminsmith
Hi BSanjay,

That's currently not supported vis the REST API. I can submit a feature request on your behalf if you'd like. Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.

As a workaround, you could create a shell script to update/modify the file (/usr/local/nagios/etc/resource.cfg).

Re: Nagios XI - API to Update Macro Passwords

Posted: Fri Jan 24, 2020 1:44 pm
by bsanjay
Hello Benjaminsmith,
Thanks for the response. Please submit a feature request for the same.

Best Regards,
BSanjay

Re: Nagios XI - API to Update Macro Passwords

Posted: Fri Jan 24, 2020 2:03 pm
by benjaminsmith
Hi BSanjay,
Thanks for the response. Please submit a feature request for the same.

Will do. Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.

Thank you for using Nagios.