Mass add notes url

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Mass add notes url

Post by gwakem »

Nagios XI 5.8.1
RHEL 7.9
I need to add a action URL to several hundred service checks, so naturally I went to the Bulk Modifications Tool, but didnt find a way to alter or add a link to that specific field.
I am trying to avoid making a separate template for this specific service and then pulling these service checks out of their existing template and placed in the new one. Any ideas, or is the template option the only way to go?
If it doesn't yet exist and hasn't been requested as a feature update, the ability to add Notes and Action URL and such via bulk modifications would be a good thing to have.
--
Griffin Wakem
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Mass add notes url

Post by ssax »

Are they the same service name? What I'm trying to determine is if we can do it with a simple SQL query based on the service_description (like the command below) OR if you'll also need to pass the hosts to differentiate them if it's not all services of that same name that should be changed:
- NOTE: Make sure you apply configuration successfully FIRST so that it creates a good snapshot in Admin > Config Snapshots that you can revert back to in the event you make a mistake or want to undo the change

Code: Select all

mysql -uroot -pnagiosxi nagiosql -e "UPDATE tbl_service SET action_url = 'blah', notes = 'blah2' WHERE service_description = 'SSH';"
I have previously submitted a feature-request to add the Misc Options to the Bulk Modifications Tool but it hasn't been implemented as of yet.
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Re: Mass add notes url

Post by gwakem »

Thank you, this is what I needed conformation on. I will store that sql command for future use, but we are undergoing an initiative to add note_urls to every service check pointing to a relevant KB article. As there are ~7k currently, a tool would have made this much easier and safer. I do hope that gets added soon as it seems like an easy add and win.

That was all I needed, feel free to lock.
--
Griffin Wakem
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Mass add notes url

Post by ssax »

Sounds good, glad to help! I agree that would be handy to have. Locking now.
Locked