Customize Status Meassages

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
tariqondego
Posts: 85
Joined: Fri Mar 28, 2014 6:18 am

Customize Status Meassages

Post by tariqondego »

Is it possible to customize status messages?
I have a scenario in which I just want to tcp to an application,though not conect to it.
So,a 'Connection refused' message would be ok,because that would show the application is running because it refused the connection.
How can i customize nagios to display green, 'OK' for status and 'OK' for status information? in this scenario and red for any other scenario
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Customize Status Meassages

Post by slansing »

That would be controlled by the plugin's output itself, you would need to alter the exit codes / echoed messages that accompany them.

https://nagios-plugins.org/doc/guidelines.html

Nagios relies on Unknown, OK, Warning, and Critical thresholds for more than just display, for instance, it is what is used to effectively complete your reports, as well as control alerts, and event handlers. I would not toy too much with that. You may be able to change just the color of the output but still retain the normal state.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Customize Status Meassages

Post by tmcdonald »

You can also reverse the status of OK/Critical by using the "negate" plugin:

http://assets.nagios.com/downloads/nagi ... Plugin.pdf
Former Nagios employee
tariqondego
Posts: 85
Joined: Fri Mar 28, 2014 6:18 am

Re: Customize Status Meassages

Post by tariqondego »

Thnaks alot guys,negate will do for now.
Locked