Hi,
I want to update the Service Status screen manually from mysql command with a new alert. is it possible ?
what's the minimum fields to update in order to see it as an active alert ? tried something like that :
echo "use nagios; INSERT INTO nagios_servicestatus (output,notifications_enabled) VALUES ('test123','1');" | mysql -h xxxxxxxx -t -pxxxxxxx
can you send me an example ?
Thanks
Insert from database
Re: Insert from database
This is not something we can recommend doing, and any damage caused to the system from manual database manipulation would not be covered by your support contract.
That being said, the command you specified should work only as far as updating what the current status is displayed as. It will not affect notifications, current status, performance data, or anything else within the Nagios process itself. This is a purely cosmetic change and will be overwritten the next time the check is run. Keep in mind, this only changes things from the point of view of the database - this does not affect what the Nagios process sees. There may also be other processes and fields in the database that might rely on that data being pristine, and modifying it outside of the Nagios process could have unintended consequences, especially if done improperly.
Once again, this is not something we can suggest or support. Continue at your own risk.
That being said, the command you specified should work only as far as updating what the current status is displayed as. It will not affect notifications, current status, performance data, or anything else within the Nagios process itself. This is a purely cosmetic change and will be overwritten the next time the check is run. Keep in mind, this only changes things from the point of view of the database - this does not affect what the Nagios process sees. There may also be other processes and fields in the database that might rely on that data being pristine, and modifying it outside of the Nagios process could have unintended consequences, especially if done improperly.
Once again, this is not something we can suggest or support. Continue at your own risk.
Former Nagios employee