Page 1 of 2

Status Information Length

Posted: Sun May 08, 2016 8:20 pm
by Pikmin
Hello,
Is there a way to change the character limit of Status Information?

I'm using the check_wmi_plus.pl plugin to display errors in Event Log but it's too long and output is truncated

From the terminal I get this:

Code: Select all

OK - 2 event(s) of Severity Level: "Error,Warning,Information", were recorded in the last 72 hours from the DFS Replication Event Log. (List is on next line. Fields shown are - Logfile:TimeGenerated:EventId:EventCode:SeverityLevel:Type:SourceName:Message)|'Event Count'=2; 
DFS Replication:20160506043702.000000-000:1073746828:5004:Information:DFSR:The DFS Replication service successfully established an inbound connection with partner SERVER for replication group Videos.      Additional Information:   Connection Address Used: SERVER.SOMETHING.LOCAL   Connection ID: B20EB123-BA52-4664-989E-4E82E40B003A   Replication Group ID: 9216FA20-EC35-4FAF-A767-B2430B1806A0
In Nagios web interface all I get is

Code: Select all

WARNING - [Triggered by _ItemCount>-] - 2 event(s) of Severity Level: "Error,Warning,Information", were recorded in the last 72 hours from the DFS Replication Event Log. (List is on next line. Fields shown are - Logfile:TimeGenerated:EventId:EventCode:SeverityLevel:Type:SourceName:Message) 
Thank you!

Re: Status Information Length

Posted: Sun May 08, 2016 8:22 pm
by Box293
The steps in this KB article will resolve your problem:

https://support.nagios.com/kb/article.php?id=478

Re: Status Information Length

Posted: Sun May 08, 2016 9:35 pm
by Pikmin
Hi Box293,
That appears to be instructions on how to get it going with XI, I only have the Core

Output of my nagios.log shows it's truncated there as well, however if I execute the check_wmi_plus.pl from the terminal everything is there

Code: Select all

Warning,Information", were recorded in the last 72 hours from the DFS Replication Event Log. (List is on next line. Fields shown are - Logfile:TimeGenerated:EventId:EventCode:SeverityLevel:Type:SourceName:Message)
[1462755697] SERVICE NOTIFICATION: nagiosadmin;SERVER;DFS Replication Log;WARNING;notify-service-by-email;WARNING - [Triggered by _ItemCount>-] - 2 event(s) of Severity Level: "Error,Warning,Information", were recorded in the last 72 hours from the DFS Replication Event Log. (List is on next line. Fields shown are - Logfile:TimeGenerated:EventId:EventCode:SeverityLevel:Type:SourceName:Message)
[1462755697] wproc:   host=SERVER; service=DFS Replication Log; contact=nagiosadmin

Re: Status Information Length

Posted: Mon May 09, 2016 12:01 am
by Box293
Please show us your service definition and command definition.

Also show us the command you are executing at the CLI to perform the test.

Re: Status Information Length

Posted: Mon May 09, 2016 12:19 am
by Pikmin
commands.cfg

Code: Select all

define command{
command_name check_win_eventlog
command_line $USER6$/check_wmi_plus.pl -H $HOSTADDRESS$ -m checkeventlog -u $USER4$ -p $USER5$ -a $ARG1$ -o $ARG2$ -3 $ARG3$ -w $ARG4$ -c $ARG5$ $ARG6$ $ARG7$
}
windows.cfg

Code: Select all

define service {
        use                     windows_service
	    host_name               SERVER
        service_description     DFS Replication Log
        check_command           check_win_eventlog!'DFS Replication'!3!72
        }
check_wmi_plus.pl

Code: Select all

./check_wmi_plus.pl -H SERVER -u DOMAIN/username -p password -m checkeventlog -a "DFS Replication" -o 3 -3 72

Re: Status Information Length

Posted: Mon May 09, 2016 1:25 pm
by rkennedy
What version of Nagios Core are you running?

Re: Status Information Length

Posted: Mon May 09, 2016 4:39 pm
by Pikmin
NagiosĀ® Coreā„¢
Version 4.1.1
August 19, 2015

Running on Centos 7

Re: Status Information Length

Posted: Mon May 09, 2016 4:43 pm
by rkennedy
Got it. At first I thought it may have been the version, but after looking over what you provided once again I noticed this part -

Code: Select all

|'Event Count'=2;
DFS Replication:20160506043702.000000-000:1073746828:5004:Information:DFSR:The DFS Replication service successfully established an inbound connection with partner SERVER for replication group Videos.      Additional Information:   Connection Address Used: SERVER.SOMETHING.LOCAL   Connection ID: B20EB123-BA52-4664-989E-4E82E40B003A   Replication Group ID: 9216FA20-EC35-4FAF-A767-B2430B1806A0
Anything after | is going to be considered the performance data, which is why you aren't seeing any of the remaining information.

Re: Status Information Length

Posted: Mon May 09, 2016 7:16 pm
by Pikmin
Can you please elaborate on that?

Re: Status Information Length

Posted: Mon May 09, 2016 7:26 pm
by Box293
https://nagios-plugins.org/doc/guidelines.html
Nagios 3 and newer will concatenate the parts following a "|" in a) the first line output by the plugin, and b) in the second to last line, into a string it passes to whatever performance data processing it has configured. (Note that it currently does not insert additional whitespace between both, so the plugin needs to provide some to prevent the last pair of a) and the first of b) getting run together.) Please refer to the Nagios documentation for information on how to configure such processing. However, it is the responsibility of the plugin writer to ensure the performance data is in a "Nagios Plugins" format. This is the expected format:

'label'=value[UOM];[warn];[crit];[min];[max]
Anything to the right of the pipe symbol will not appear as status information, but it should still appear as performance data (even though it shouldn't be there):
Selection_041.png