Trailing slash n removal...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Trailing slash n removal...

Post 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.
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Trailing slash n removal...

Post 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
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Trailing slash n removal...

Post 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?
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Trailing slash n removal...

Post by SteveBeauchemin »

Yes, newline is in status.dat

Code: Select all

^Iplugin_output=NRPE v2.15\n$
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Trailing slash n removal...

Post 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
Locked