Page 2 of 2

Re: Trailing slash n removal...

Posted: Tue Mar 07, 2017 1:37 pm
by SteveBeauchemin
That doc you referred me to was what I was thinking about in my original post. Turns out I already have that defined for the perfdata. Note: Perf Data and not Nagios Status data.
This is how I have that set, and I did verify that it is still required as the initial data does have /n

Code: Select all

process-host-perfdata-file-bulk
/bin/sed -i 's/\\n//g' /var/nagiosramdisk/host-perfdata &&
 /bin/mv /var/nagiosramdisk/host-perfdata /var/nagiosramdisk/spool/xidpe/$TIMET$.perfdata.host

process-service-perfdata-file-bulk
/bin/sed -i 's/\\n//g' /var/nagiosramdisk/service-perfdata &&
 /bin/mv /var/nagiosramdisk/service-perfdata /var/nagiosramdisk/spool/xidpe/$TIMET$.perfdata.service
So this is still required. Also note: Change was required for ramdisk.

So, that is not a solution to this problem. It is a solution and is needed, but for something else.

I do wonder if you really intended me to comment out livestatus temporarily. That is only used for NagVis to read from. I will humor you though just because. I will have a chance to do that test later today.

Re: Trailing slash n removal...

Posted: Tue Mar 07, 2017 2:06 pm
by SteveBeauchemin
More data - sql query related.

Since scrolling data is fun, but not much fun, I made a slight modification so I could get a better picture of my data. I migrated to Red Hat 7 in 2017, was using Red Hat 6 in 2016, so this was easy.

Code: Select all

select output, last_check from nagios_servicestatus where output like '%NRPE%' and last_check like '2016%';
| NRPE v2.15          | 2016-11-29 16:32:44 |
has NO /n in the responses in any line.

Code: Select all

select output, last_check from nagios_servicestatus where output like '%NRPE%' and last_check like '2017%';
| NRPE v2.15\n        | 2017-03-07 12:59:13 |
is full of /n responses in every line.

Does that help? I chose that data arbitrarily, but it does show a before and after.

Steve B

Re: Trailing slash n removal...

Posted: Tue Mar 07, 2017 5:41 pm
by ssax
Open up your status.dat file in vi and type :set list, now find the services that have the \n in the display, does it show the newline in the status.dat for any of the services?

Re: Trailing slash n removal...

Posted: Tue Mar 07, 2017 6:11 pm
by SteveBeauchemin
Yes, newline is in status.dat

Code: Select all

^Iplugin_output=NRPE v2.15\n$

Re: Trailing slash n removal...

Posted: Wed Mar 08, 2017 3:27 pm
by ssax
Hmm, I'm not sure where that's coming from, are you able to do a remote session? If so, let's move this into a ticket, please email [email protected] with a descriptive subject and detailed body and please include a link back to this thread so that we can get a remote session setup.

Thank you