Status Information Length

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.
Pikmin
Posts: 82
Joined: Tue Feb 17, 2015 5:32 pm

Status Information Length

Post 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!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Status Information Length

Post by Box293 »

The steps in this KB article will resolve your problem:

https://support.nagios.com/kb/article.php?id=478
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Pikmin
Posts: 82
Joined: Tue Feb 17, 2015 5:32 pm

Re: Status Information Length

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Status Information Length

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Pikmin
Posts: 82
Joined: Tue Feb 17, 2015 5:32 pm

Re: Status Information Length

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Status Information Length

Post by rkennedy »

What version of Nagios Core are you running?
Former Nagios Employee
Pikmin
Posts: 82
Joined: Tue Feb 17, 2015 5:32 pm

Re: Status Information Length

Post by Pikmin »

Nagios® Core™
Version 4.1.1
August 19, 2015

Running on Centos 7
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Status Information Length

Post 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.
Former Nagios Employee
Pikmin
Posts: 82
Joined: Tue Feb 17, 2015 5:32 pm

Re: Status Information Length

Post by Pikmin »

Can you please elaborate on that?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Status Information Length

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked