check_log pluggin getting Service Check Timed Out

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: check_log pluggin getting Service Check Timed Out

Postby kyang » Mon Jan 08, 2018 3:41 pm

Thanks for the help @mcapra!

bosco, let us know if you have any more questions after reading what mcapra wrote.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1167
Joined: Tue Jul 25, 2017 3:35 pm

Re: check_log pluggin getting Service Check Timed Out

Postby bosco » Wed Jan 10, 2018 12:02 am

Couln't find any "seekfiles" in tmp or temp or the respetive log files folder. Could you share how to get the versions of check_log3.
bosco
 
Posts: 32
Joined: Thu Nov 24, 2016 5:34 am

Re: check_log pluggin getting Service Check Timed Out

Postby bosco » Wed Jan 10, 2018 2:23 am

Thanks,

Tried to find the "seekfile" in tmp,temp and respective log folder,couldnt find that file.Also could you share how to fetch version of check_log3
bosco
 
Posts: 32
Joined: Thu Nov 24, 2016 5:34 am

Re: check_log pluggin getting Service Check Timed Out

Postby tgriep » Wed Jan 10, 2018 4:23 pm

One more thing to try is to increase the timeout settings for NSClient++.

Edit the nsclient.ini file on the server in question and add the following option

Code: Select all
timeout = 120


Under these sections
Code: Select all
[/settings/default]
[/settings/external scripts]


Save the ini file and restart NSClient++ to load the changes.

Typically, to bet the version of a plugin, all you have to do is run the executable with --help and it should print out the help screen and version number if it was written to do so.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 6309
Joined: Thu Oct 30, 2014 9:02 am

Re: check_log pluggin getting Service Check Timed Out

Postby lmiltchev » Wed Jan 10, 2018 4:44 pm

I am not very familiar with check_log3 as this is a 3rd party plugin, but I believe you could do the following:

# To specify a seek file
Use the "-s" flag. You may need to create the file first.

Example (in nsclient.ini):
Code: Select all
check_log3 = scripts\check_log3.exe -l "c:\test.log" -p "failed" -s "c:\seek"


Test from Nagios:
Code: Select all
[root@main-nagios-xi services]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_log3
WARNING: Found 3 lines (limit=1/0): This is a test - failed|'lines'=3


When I open the "seek" file in a text editor, I see "71". The number updates, when "new failed" entries are added to the log.

# To check the version number of the plugin
You could use the "-v" flag.

Example (in nsclient.ini):
Code: Select all
check_log3_version = scripts\check_log3.exe -v


Test from Nagios:
Code: Select all
[root@main-nagios-xi services]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_log3_version
check_log3.exe version 3.11d


# To view the options/help menu
Example (in nsclient.ini):
Code: Select all
check_log3_help = scripts\check_log3.exe


Test from Nagios:
Code: Select all
[root@main-nagios-xi services]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_log3_help
Log file not specified.

This is check_log3.exe version 3.11d

Usage: check_log3.exe [ -h |'--help'=0 ']
Usage:'=0 'check_log3.exe'=0 '['=0 '-v'=0 '|'=0 '--version'=0 ']
Usage:'=0 'check_log3.exe'=0 '['=0 '-v'=0 '|'=0 '--list-encodings'=0 ']
Usage:'=0 'check_log3.exe'=0 '-l'=0 'log_file|log_directory'=0 '(-p'=0 'pattern'=0 '[-p'=0 'pattern'=0 '...])|-P'=0 'patternfile)
        [-i]'=0 '[-n'=0 'negpattern|-f'=0 'negpatternfile'=0 ']'=0 '[-s'=0 'seek_file|seek_base_dir]
        ([-m'=0 'glob-pattern]'=0 '[-t'=0 'most_recent|first_match|last_match]'=0 '[--timestamp'=0spec])
        [-d] '[-D]'=0 '[-1]'=0 '[-a]'=0 '[-C'=0 '{-|+}n]'=0 '[-q]'=0 '[-Q]'=0 '[-e'=0 ''{ eval block }'|-E'=0 'script_file]
        [--ok]|([-w'=0 'warn_count]'=0 '[-c'=0 'crit_count]'=0 '[--negate])
        [--input-enc'=0 '[--output-enc'=0 '[--crlf]
        [--missing'=0 '[--missing-msg'=0 'manual:'=0 'perldoc'=0 'check_log3.pl'=0


Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 9670
Joined: Mon May 23, 2011 12:15 pm

Previous

Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot] and 20 guests