Bulk Edit Status / Icon Image?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
rkane
Posts: 114
Joined: Wed Aug 15, 2018 3:56 pm

Bulk Edit Status / Icon Image?

Post by rkane »

I'd like to be able to clear the "status image" and "icon image" fields on all my host and service configs. Intention is to apply those via template. I don't see a way to do this through the Bulk Modifications Tool. What's the best way to achieve this?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Bulk Edit Status / Icon Image?

Post by ssax »

There is not currently a way to do this outside of running some SQL queries.

NOTE: Please make sure you have an XI backup before running these commands:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

To remove the icon_image and statusmap_image from ALL of the hosts:

Code: Select all

echo "update tbl_host set icon_image = '', statusmap_image='';" | mysql -uroot -pnagiosxi nagiosql
To remove the icon_image from ALL of the services (services don't have a statusmap_image):

Code: Select all

echo "update tbl_service set icon_image = '';" | mysql -uroot -pnagiosxi nagiosql
Then Apply Configuration.
Locked