Search found 17 matches

by dangladesh
Mon Oct 13, 2014 1:59 pm
Forum: Nagios XI
Topic: Service returning longoutput
Replies: 18
Views: 5662

Re: Service returning longoutput

Alright! I've got it working. The solution is to double escape the newline characters in the NRDS plugin outputs. The nrds.pl script runs the commands in the nrds.cfg file and concatenates their output to a string, $senddata, ending in a \n. 86 my $senddata = ""; 87 for( my $x = 0; $x < @{...
by dangladesh
Mon Oct 13, 2014 12:02 pm
Forum: Nagios XI
Topic: Service returning longoutput
Replies: 18
Views: 5662

Re: Service returning longoutput

I have done some digging. It looks like send_nrdp.sh is piped a tab delimited line from each service check. Formatted like the following: Format: <config> \t <service> \t <state> \t <output> Example: host.domain.com Uptime 0 UPTIME OK - up for 10 day(s) | upDays=10 If there is a newline in the <outp...
by dangladesh
Mon Oct 13, 2014 11:18 am
Forum: Nagios XI
Topic: Service returning longoutput
Replies: 18
Views: 5662

Re: Service returning longoutput

I have crated a test NRDS plugin that only outputs a multiline response to the Nagios Server. #!/usr/bin/ksh #Nagios Plugin - check_multiline.sh # Tests multiline output echo "MULTILINE OK - Testing Multiline output|a=0;1;2;0;10 b=1;3;5;0;10 c=2;3;4;0;10\nThis is line 1\nThis is line 2\nThis is...
by dangladesh
Mon Oct 13, 2014 10:43 am
Forum: Nagios XI
Topic: Service returning longoutput
Replies: 18
Views: 5662

Re: Service returning longoutput

Looks like multiline is working when the check is run directly on the Nagios Server (and HTML is escaped properly).
nagios_screen - multiline test.png
by dangladesh
Fri Oct 10, 2014 3:05 pm
Forum: Nagios XI
Topic: Service returning longoutput
Replies: 18
Views: 5662

Re: Service returning longoutput

Is this happening only with NDRS checks? Have you tired creating a simple bash script (or similar) to run locally to test? Currently, I am only using passive checks with NRDS. You mean run a bash script locally on the Nagios server? I forgot this check used NRDS. I don't use it so I don't know if i...
by dangladesh
Thu Oct 09, 2014 11:38 am
Forum: Nagios XI
Topic: Service returning longoutput
Replies: 18
Views: 5662

Re: Service returning longoutput

dangladesh, Did jwelch's suggestion work for you? jwelch's suggestion works when the service is returning single line output. It fails, however, when the service returns more than one line. I have tried the following outputs: STATUS | perfdata line1 line2 line3 STATUS line1 line2 line3 | perfdata S...
by dangladesh
Mon Oct 06, 2014 1:41 pm
Forum: Nagios XI
Topic: Service returning longoutput
Replies: 18
Views: 5662

Re: Service returning longoutput

Box293 wrote:What happens when you view this service in Nagios Core?
  • Service details page
    Click the Advanced Tab
    Click the See this Service in Nagios Core link
Do the multiple lines appear here?
Still just a single line in Nagios Core as well.
by dangladesh
Thu Oct 02, 2014 10:58 am
Forum: Nagios XI
Topic: Service returning longoutput
Replies: 18
Views: 5662

Service returning longoutput

I am having trouble seeing longoutput in the service details. I have looked through the documentation and believe I am formatting it properly. I am running NagiosXI 2014R1.4, checking a host passively with NRDS. Here is the block of code that returns to Nagios server: #Nagios Return if [[ $lineCount...
by dangladesh
Thu Sep 18, 2014 1:29 pm
Forum: Nagios XI
Topic: check_procs: Unable to read output
Replies: 4
Views: 2339

Re: check_procs: Unable to read output

My issue has now become reinstall NRDP or have check_procs look for the proper pst3 command?
by dangladesh
Thu Sep 18, 2014 12:11 pm
Forum: Nagios XI
Topic: check_procs: Unable to read output
Replies: 4
Views: 2339

Re: check_procs: Unable to read output

Box293 wrote:What happens when you run the command in verbose mode?

Code: Select all

check_procs -vvv
I see.. thank you Box293. What a headache. I have the nrds installed under the home directory, but it is looking for pst3 in /opt/.

Output:

Code: Select all

CMD: /opt/nagios/libexec/pst3
Unable to read output