Hi all,
I see quite a few possibilities in utilising the API in Nagios.
is it also possible to rename a host or service using the API without losing its history?
Rgds,
Matt
Rename services using API backend
-
- Posts: 903
- Joined: Tue Oct 27, 2020 1:35 pm
Re: Rename services using API backend
Hi,
How are you doing?
I asked one of my team member (Sean) for help with API command, and here's what he suggested:
Please NOTE: Just renaming the host (through API or manually) will cause the historical graphing/object notes to not carry over.
You must use the "Bulk Renaming" tool in CCM if you want the historical graphing to carry over to the new HOST / SERVICE.
Here's a video on how to rename HOST / SERVICE using "Bulk Renaming" tool:
https://support.nagios.com/kb/article/n ... l-732.html
Best Regards,
Vinh
How are you doing?
I asked one of my team member (Sean) for help with API command, and here's what he suggested:
Code: Select all
https://x.x.x.x/nagiosxi/api/v1/config/host/HOSTNAME?host_name=NEWHOSTNAME&apikey=YYYYYYYYYYYYYYYYYY&pretty=1&address=127.0.0.1¬ification_interval=30&applyconfig=1
You must use the "Bulk Renaming" tool in CCM if you want the historical graphing to carry over to the new HOST / SERVICE.
Here's a video on how to rename HOST / SERVICE using "Bulk Renaming" tool:
https://support.nagios.com/kb/article/n ... l-732.html
Best Regards,
Vinh