/n & \n showing up in service descriptions
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: /n & \n showing up in service descriptions
Based on your output there, I can see that every single \ is being replaced with \\. This is definitely not a known core or gearman issue, and is likely something to do with your command reaping check results. Could you post your nagios.cfg and commands.cfg files please. We would like to verify what may have changed in there.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: /n & \n showing up in service descriptions
See attached.sreinhardt wrote:Based on your output there, I can see that every single \ is being replaced with \\. This is definitely not a known core or gearman issue, and is likely something to do with your command reaping check results. Could you post your nagios.cfg and commands.cfg files please. We would like to verify what may have changed in there.
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: /n & \n showing up in service descriptions
I think we found your issue! Looks like you still have the sed replace lines that was a manual modification for gearman on r1.0 or r1.1, simply reverting this should resolve the issue.
Services FROM:
Hosts FROM:
Give nagios a restart (service nagios restart) and some time for check results to come in, see if that clears up the issues for you.
Services FROM:
Code: Select all
define command {
command_name process-service-perfdata-file-bulk
command_line sed -i 's/\\n//g' /usr/local/nagios/var/service-perfdata && /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.service
}
TO:
define command {
command_name process-service-perfdata-file-bulk
command_line /usr/local/nagios/var/service-perfdata && /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.service
}Code: Select all
define command {
command_name process-host-perfdata-file-bulk
command_line sed -i 's/\\n//g' /usr/local/nagios/var/host-perfdata && /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.host
}
TO:
define command {
command_name process-host-perfdata-file-bulk
command_line /usr/local/nagios/var/host-perfdata && /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.host
}Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: /n & \n showing up in service descriptions
This was the instructions from your team, I double confirmed the steps to implement Gearman with just last week.sreinhardt wrote:I think we found your issue! Looks like you still have the sed replace lines that was a manual modification for gearman on r1.0 or r1.1, simply reverting this should resolve the issue.
Services FROM:Hosts FROM:Code: Select all
define command { command_name process-service-perfdata-file-bulk command_line sed -i 's/\\n//g' /usr/local/nagios/var/service-perfdata && /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.service } TO: define command { command_name process-service-perfdata-file-bulk command_line /usr/local/nagios/var/service-perfdata && /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.service }Give nagios a restart (service nagios restart) and some time for check results to come in, see if that clears up the issues for you.Code: Select all
define command { command_name process-host-perfdata-file-bulk command_line sed -i 's/\\n//g' /usr/local/nagios/var/host-perfdata && /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.host } TO: define command { command_name process-host-perfdata-file-bulk command_line /usr/local/nagios/var/host-perfdata && /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.host }
Anyway I will check this out
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: /n & \n showing up in service descriptions
After making the changes I am getting all kind of errors. The \\, \n are still there.
The graphs stopped updating.
I reverted back to the original commands with sed and the error messages went off.
The graphs started updating again.
Please double check your instructions.
The graphs stopped updating.
Code: Select all
[1404347273] Warning: Attempting to execute the command "/usr/local/nagios/var/service-perfdata && /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/1404347273.perfdata.service" resulted in a return code of 126. Make sure the script or binary you are trying to execute actually exists...
[1404347273] Warning: Attempting to execute the command "/usr/local/nagios/var/host-perfdata && /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/1404347273.perfdata.host" resulted in a return code of 126. Make sure the script or binary you are trying to execute actually exists...
[1404347287] Warning: Attempting to execute the command "/usr/local/nagios/var/host-perfdata && /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/1404347287.perfdata.host" resulted in a return code of 126. Make sure the script or binary you are trying to execute actually exists...
[1404347287] Warning: Attempting to execute the command "/usr/local/nagios/var/service-perfdata && /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/1404347287.perfdata.service" resulted in a return code of 126. Make sure the script or binary you are trying to execute actually exists...
[1404347293] SERVICE ALERT: BHQPDMESXIU06;VMH CPU Usage;WARNING;SOFT;2;ESX3 WARNING - cpu usage=74.94 %
[1404347303] Warning: Attempting to execute the command "/usr/local/nagios/var/host-perfdata && /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/1404347303.perfdata.host" resulted in a return code of 126. Make sure the script or binary you are trying to execute actually exists...
[1404347303] Warning: Attempting to execute the command "/usr/local/nagios/var/service-perfdata && /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/1404347303.perfdata.service" resulted in a return code of 126. Make sure the script or binary you are trying to execute actually exists...
Code: Select all
define command {
command_name process-host-perfdata-file-bulk
command_line /usr/local/nagios/var/host-perfdata && /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.host
}
define command {
command_name process-service-perfdata-file-bulk
command_line /usr/local/nagios/var/service-perfdata && /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.service
} The graphs started updating again.
Please double check your instructions.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: /n & \n showing up in service descriptions
You are right, this was the original quick fix for gearman with r1.0, which has since been resolved. I missed a portion after the sed, the output saying what is wrong probably should have lead you to see this, but the changes you need to make are:
Just and additional note, you commands must have been altered somewhat from defaults, probably nothing to worry about, but the default commands look like:
Code: Select all
define command {
command_name process-host-perfdata-file-bulk
command_line /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.host
}
define command {
command_name process-service-perfdata-file-bulk
command_line /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.serviceCode: Select all
define command {
command_name process-service-perfdata-file-pnp-bulk
command_line /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/perfdata/service-perfdata.$TIMET$
}
define command {
command_name process-host-perfdata-file-pnp-bulk
command_line /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/perfdata/host-perfdata.$TIMET$
}
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: /n & \n showing up in service descriptions
Made the changes in Dev.
Graphs stopped updating. The \n are still there. Performance Data still has \n Some graphs went missing, CPU is there but storage all gone.
No error messages in nagios.log
Reverted back. Restarted nagios , gearman services, npcd. Graphs started updating.
However the storage graphs still not showing up
No error messages after restart in the following files.
/usr/local/nagios/var/nagios.log
/var/log/mod_gearman/mod_gearman_neb.log
/var/log/mod_gearman/mod_gearman_worker.log
Graphs stopped updating. The \n are still there. Performance Data still has \n Some graphs went missing, CPU is there but storage all gone.
No error messages in nagios.log
Code: Select all
/var/log/mod_gearman/mod_gearman_worker.log
[2014-07-04 07:39:50][7063][ERROR] sending job to gearmand failed: flush(GEARMAN_COULD_NOT_CONNECT) localhost:4730 -> libgearman/connection.cc:498
Code: Select all
/var/log/mod_gearman/mod_gearman_neb.log
[2014-07-04 08:29:24][18578][ERROR] sending job to gearmand failed: flush(GEARMAN_COULD_NOT_CONNECT) localhost:4730 -> libgearman/connection.cc:498However the storage graphs still not showing up
No error messages after restart in the following files.
/usr/local/nagios/var/nagios.log
/var/log/mod_gearman/mod_gearman_neb.log
/var/log/mod_gearman/mod_gearman_worker.log
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: /n & \n showing up in service descriptions
We need to see these problems in action. Could you open a ticket at [email protected] ?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: /n & \n showing up in service descriptions
Done.abrist wrote:We need to see these problems in action. Could you open a ticket at [email protected] ?
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: /n & \n showing up in service descriptions
Locking, ticket opened.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.