Code: Select all
\\nCode: Select all
<BR>for what it's worth, the same thing happens when I use:
Code: Select all
\nCode: Select all
\\nCode: Select all
<BR>Code: Select all
\nCode: Select all
-bash-4.1$ cat multiline_output.pl
#!/usr/bin/perl -w
print "testing multi line output\\\\n";
print "hello world\\\\n";
print "this is another line\\\\n";
exit 0;
-bash-4.1$Code: Select all
-bash-4.1$ ./multiline_output.pl
testing multi line output\\nhello world\\nthis is another line\\n-bash-4.1$ Code: Select all
{
"format_version": 0,
"result": {
"query_time": 1404768234000,
"cgi": "statusjson.cgi",
"user": "nagiosadmin",
"query": "service",
"query_status": "beta",
"program_start": 1404168963000,
"last_data_update": 1404768233000,
"type_code": 0,
"type_text": "Success",
"message": ""
},
"data": {
"service": {
"host_name": "pbspl233",
"description": "qstatNoUn",
"host_name": "pbspl233",
"description": "qstatNoUn",
"plugin_output": "testing multi line outputhello worldthis is another line",
"long_plugin_output": "",
"perf_data": "",
"max_attemps": 8,
"current_attempt": 1,
"status": 2,
"last_update": 1404768232000,
"has_been_checked": true,
"should_be_scheduled": false,
"last_check": 1404768166000,
"check_options": 0,
"check_type": 1,
"checks_enabled": false,
"last_state_change": 1404168981000,
"last_hard_state_change": 1404168981000,
"last_hard_state": 0,
"last_time_ok": 1404768166000,
"last_time_warning": 0,
"last_time_unknown": 0,
"last_time_critical": 0,
"state_type": 1,
"last_notification": 0,
"next_notification": 0,
"no_more_notifications": false,
"notifications_enabled": true,
"problem_has_been_acknowledged": false,
"acknowledgement_type": 0,
"current_notification_number": 0,
"accept_passive_checks": true,
"event_handler_enabled": true,
"flap_detection_enabled": false,
"is_flapping": false,
"percent_state_change": 0.00,
"latency": 0.00,
"execution_time": 0.00,
"scheduled_downtime_depth": 0,
"process_performance_data": true,
"obsess": false
}
}
}Code: Select all
pbspl233.nas.nasa.gov: Tue Jul 8 14:33:37 2014\\n Server reports 2 jobs total (T:0 Q:0 H:0 W:0 R:2 E:0 B:0)\\n\\n Host CPUs Tasks Jobs Info\\n ---------- ---- ----- ---- -------------\\n 377 hosts 3016 0 -- har\\n 14 hosts 16 0 -- har down\\n 200 hosts 1600 1600 -- har in-use\\n 48 hosts 0 0 -- har offline\\n r701i0n3 8 0 0 har rebooting\\n\\n Req'd Elap\\nJobID Queue Jobname CPUs Nds wallt Ss wallt Eff Group Model\\n---------- ----- -------------- ---- --- ----- -- ----- --- ----- -------\\n12736.p233 long bubblesuperref 800 100 16:00 R 11:27 99% e1120 100:har\\n Job run at Tue Jul 08 at 03:05 on (r706i0n0:ncpus=8)+(r706i0n1:ncpus=8)...\\n12741.p233 long bubble0_75 800 100 16:00 R 09:22 99% e1120 100:har\\n Job run at Tue Jul 08 at 05:10 on (r701i0n13:ncpus=8)+(r701i1n0:ncpus=8...Code: Select all
/usr/bin/php /usr/local/nagios/libexec/send_nrdp.php --url=<URL> --token=<TOKEN> --host=pbspl233 --service="qstat" --state=OK --output="pbspl233.nas.nasa.gov: Tue Jul 8 14:33:37 2014\\n Server reports 2 jobs total (T:0 Q:0 H:0 W:0 R:2 E:0 B:0)\\n\\n Host CPUs Tasks Jobs Info\\n ---------- ---- ----- ---- -------------\\n 377 hosts 3016 0 -- har\\n 14 hosts 16 0 -- har down\\n 200 hosts 1600 1600 -- har in-use\\n 48 hosts 0 0 -- har offline\\n r701i0n3 8 0 0 har rebooting\\n\\n Req'd Elap\\nJobID Queue Jobname CPUs Nds wallt Ss wallt Eff Group Model\\n---------- ----- -------------- ---- --- ----- -- ----- --- ----- -------\\n12736.p233 long bubblesuperref 800 100 16:00 R 11:27 99% e1120 100:har\\n Job run at Tue Jul 08 at 03:05 on (r706i0n0:ncpus=8)+(r706i0n1:ncpus=8)...\\n12741.p233 long bubble0_75 800 100 16:00 R 09:22 99% e1120 100:har\\n Job run at Tue Jul 08 at 05:10 on (r701i0n13:ncpus=8)+(r701i1n0:ncpus=8..."Code: Select all
<TD CLASS='dataVal'>pbspl233.nas.nasa.gov: Tue Jul 8 14:33:37 2014<BR> Server reports 2 jobs total (T:0 Q:0 H:0 W:0 R:2 E:0 B:0)<BR>\n Host CPUs Tasks Jobs Info<BR> ---------- ---- ----- ---- -------------<BR> 377 hosts 3016 0 -- har<BR> 14 hosts 16 0 -- har down<BR> 200 hosts 1600 1600 -- har in-use<BR> 48 hosts 0 0 -- har offline<BR> r701i0n3 8 0 0 har rebooting<BR>\n Req'd Elap<BR>JobID Queue Jobname CPUs Nds wallt Ss wallt Eff Group Model<BR>---------- ----- -------------- ---- --- ----- -- ----- --- ----- -------<BR>12736.p233 long bubblesuperref 800 100 16:00 R 11:27 99% e1120 100:har<BR> Job run at Tue Jul 08 at 03:05 on (r706i0n0:ncpus=8)+(r706i0n1:ncpus=8)...<BR>12741.p233 long bubble0_75 800 100 16:00 R 09:22 99% e1120 100:har<BR> Job run at Tue Jul 08 at 05:10 on (r701i0n13:ncpus=8)+(r701i1n0:ncpus=8...</TD>Code: Select all
{
"format_version": 0,
"result": {
"query_time": 1404855897000,
"cgi": "statusjson.cgi",
"user": "nagiosadmin",
"query": "service",
"query_status": "beta",
"program_start": 1404168963000,
"last_data_update": 1404855893000,
"type_code": 0,
"type_text": "Success",
"message": ""
},
"data": {
"service": {
"host_name": "pbspl233",
"description": "qstat",
"host_name": "pbspl233",
"description": "qstat",
"plugin_output": "pbspl233.nas.nasa.gov: Tue Jul 8 14:33:37 2014",
"long_plugin_output": " Server reports 2 jobs total (T:0 Q:0 H:0 W:0 R:2 E:0 B:0)\n Host CPUs Tasks Jobs Info ---------- ---- ----- ---- ------------- 377 hosts 3016 0 -- har 14 hosts 16 0 -- har down 200 hosts 1600 1600 -- har in-use 48 hosts 0 0 -- har offline r701i0n3 8 0 0 har rebooting\n Req'd ElapJobID Queue Jobname CPUs Nds wallt Ss wallt Eff Group Model---------- ----- -------------- ---- --- ----- -- ----- --- ----- -------12736.p233 long bubblesuperref 800 100 16:00 R 11:27 99% e1120 100:har Job run at Tue Jul 08 at 03:05 on (r706i0n0:ncpus=8)+(r706i0n1:ncpus=8)...12741.p233 long bubble0_75 800 100 16:00 R 09:22 99% e1120 100:har Job run at Tue Jul 08 at 05:10 on (r701i0n13:ncpus=8)+(r701i1n0:ncpus=8...",
"perf_data": "",
"max_attemps": 8,
"current_attempt": 1,
"status": 2,
"last_update": 1404855893000,
"has_been_checked": true,
"should_be_scheduled": false,
"last_check": 1404855884000,
"check_options": 0,
"check_type": 1,
"checks_enabled": false,
"last_state_change": 1403202596000,
"last_hard_state_change": 1403202596000,
"last_hard_state": 0,
"last_time_ok": 1404855884000,
"last_time_warning": 0,
"last_time_unknown": 0,
"last_time_critical": 0,
"state_type": 1,
"last_notification": 0,
"next_notification": 0,
"no_more_notifications": false,
"notifications_enabled": true,
"problem_has_been_acknowledged": false,
"acknowledgement_type": 0,
"current_notification_number": 0,
"accept_passive_checks": true,
"event_handler_enabled": true,
"flap_detection_enabled": false,
"is_flapping": false,
"percent_state_change": 0.00,
"latency": 0.00,
"execution_time": 0.00,
"scheduled_downtime_depth": 0,
"process_performance_data": true,
"obsess": false
}
}
}
Code: Select all
<BR>Code: Select all
\n