Page 1 of 1

Bulk Edit Status / Icon Image?

Posted: Mon Sep 24, 2018 3:49 pm
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?

Re: Bulk Edit Status / Icon Image?

Posted: Mon Sep 24, 2018 4:55 pm
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.