Is it possible to |sort -u
in a check command?
#check_active_Node
define command{
command_name check_active_node_list
command_line /usr/lib/nagios/plugins/check_active_node.sh '$ARG1$' '$ARG2$'|sort -u
Normally no. The pipe character "|" would normally not be allowed as part of the line being executed by Nagios - there are important security reasons for this. There are ways around it, but I'd not recommend using any of them. Your best solution would be to modify the plugin (create a check_active_node_custom.sh and edit that), and add what ever sorting you need to the script itself. Remember that the Nagios system expects certain return codes and text from a plugin, and that should still function as expected after your edits.