thank you.. I tried with --report=long but that stopped alert generation. Below is the command parameter i am currently using to alert for the logs.
check_nrpe!check_singlepattern! -a '--logfile=/var/opt/log/logtest -criticalpattern=/*'!!!!!!
Check_single patter is nothing my check_logfiles command.Below is what i have defined in the nrpe.cfg.
command[check_singlepattern]=/usr/local/nagios/libexec/check_logfiles $ARG1$ $ARG2$
Status Information Cut Off character restriction
Re: Status Information Cut Off character restriction
How/where did you run it with the option added? I was able to modify nrpe.cfg on the client, restart the service, and return all lines:
command[check_singlepattern]=/usr/local/nagios/libexec/check_logfiles $ARG1$ $ARG2$ --report=long
command[check_singlepattern]=/usr/local/nagios/libexec/check_logfiles $ARG1$ $ARG2$ --report=long
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Status Information Cut Off character restriction
i have updated the nrpe.cfg file with the below line
command[check_singlepattern]=/usr/local/nagios/libexec/check_logfiles $ARG1$ $ARG2$ --report=long and restarted the nagios service.
After i have added three separate lines in the log file with the text -- test1 , test2 and test3 respectively and got the below output.
how can we make the ouput comes in three different lines and how to avoide the "n" getting update against each line
_________________________________________
***** Nagios XI Alert *****
Nagios has detected a problem with this service.
Notification Type: PROBLEM
Service: log test
Host: lxxxx-v
Address: 1x.x.xx.xx
State: CRITICAL
Info: CRITICAL - (3 errors in check_logfiles.protocol-2018-02-16-15-09-30) - test3 ...
tag default CRITICAL\ntest1\ntest2\ntest3\n\n
Date/Time: 2018-02-16 15:09:31
_______________________________________________________
command[check_singlepattern]=/usr/local/nagios/libexec/check_logfiles $ARG1$ $ARG2$ --report=long and restarted the nagios service.
After i have added three separate lines in the log file with the text -- test1 , test2 and test3 respectively and got the below output.
how can we make the ouput comes in three different lines and how to avoide the "n" getting update against each line
_________________________________________
***** Nagios XI Alert *****
Nagios has detected a problem with this service.
Notification Type: PROBLEM
Service: log test
Host: lxxxx-v
Address: 1x.x.xx.xx
State: CRITICAL
Info: CRITICAL - (3 errors in check_logfiles.protocol-2018-02-16-15-09-30) - test3 ...
tag default CRITICAL\ntest1\ntest2\ntest3\n\n
Date/Time: 2018-02-16 15:09:31
_______________________________________________________
-
kyang
Re: Status Information Cut Off character restriction
You can try taking a look at this older forum thread which solves the /n issue by adding a sed command in the xi_service_notification_handler in the commands.cfg.
NOTE: Make sure to keep a backup of your original xi_service_notification_handler in case it doesn't work and you have to revert back.
https://support.nagios.com/forum/viewto ... 9&p=167572
Let me know if that works for you.
NOTE: Make sure to keep a backup of your original xi_service_notification_handler in case it doesn't work and you have to revert back.
https://support.nagios.com/forum/viewto ... 9&p=167572
Let me know if that works for you.
Re: Status Information Cut Off character restriction
I tried the solution provided in the thread it works. the only issue it displays the result as given below. The only changes i would like is remove the bold lines in the below output.. Is there any way to
____________________________________________________________________________
Info: CRITICAL - (6 errors in check_logfiles.protocol-2018-02-21-08-43-35) [color=#FFFF40- test18....
tag default CRITICAL
_(null)_
test14
test15
test16
test17
test18
________________________________
____________________________________________________________________________
Info: CRITICAL - (6 errors in check_logfiles.protocol-2018-02-21-08-43-35) [color=#FFFF40- test18....
tag default CRITICAL
_(null)_
test14
test15
test16
test17
test18
________________________________
-
kyang
Re: Status Information Cut Off character restriction
I would have to test it, so I can provide the correct solution.
Can you give me the xi_notification_handler command that you are using to produce this?
Also, the email template that you are using for this alert.
Thanks!
Can you give me the xi_notification_handler command that you are using to produce this?
Also, the email template that you are using for this alert.
Thanks!
Re: Status Information Cut Off character restriction
Thank you Kyang. I was able to fix the issue in the notification option i had both logservice output and service output were defined against info:
I have removed the service output and able to get the output in the below format.
State: CRITICAL
Info: tag default CRITICAL
test19
test20
test21
test22
test23
Date/Time: 2018-02-21 14:53:29
Please keep this thread open till Friday as i am going to implement this for actual scenario and will update you back based on the result.
I have removed the service output and able to get the output in the below format.
State: CRITICAL
Info: tag default CRITICAL
test19
test20
test21
test22
test23
Date/Time: 2018-02-21 14:53:29
Please keep this thread open till Friday as i am going to implement this for actual scenario and will update you back based on the result.
-
kyang
Re: Status Information Cut Off character restriction
Sounds good!
I'll keep this open for you in the meantime.
I'll keep this open for you in the meantime.
Re: Status Information Cut Off character restriction
Hello Kyang,
Please go ahead and close this thread. I am good. thank you for your help.
Regards,
Narayana
Please go ahead and close this thread. I am good. thank you for your help.
Regards,
Narayana
-
kyang
Re: Status Information Cut Off character restriction
Sounds good! I'll be closing this thread!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!