Search found 20 matches

by CLee1972
Thu Oct 04, 2018 4:53 pm
Forum: Open Source Nagios Projects
Topic: check_log with options
Replies: 3
Views: 1976

Re: check_log with options

Scott, First off, thanks for the quick reply. Essentially, what I am looking for is this: Example: I am using check_log to query on "503 - Server Not Found". The problem is, I can see this event happen in the log every now and then but there is a failover event that hits another server whe...
by CLee1972
Thu Oct 04, 2018 3:58 pm
Forum: Open Source Nagios Projects
Topic: check_log with options
Replies: 3
Views: 1976

check_log with options

Hello, I am looking for a check_log that has the option to allow for OK, Warn and Critical settings. So far the only check_log I have allows for Warn values but I really want something a little more flexible so my Nagios Core server will stop firing the alerts every time I get a blip in my logs. If ...
by CLee1972
Mon Jun 04, 2018 3:56 pm
Forum: Open Source Nagios Projects
Topic: Different results for NRPE vs running locally
Replies: 8
Views: 3706

Re: Different results for NRPE vs running locally

Yeah, I just ran which jstack which let me know it was located in /bin/jstack. I love how complex it is being. When I put that into the script, restarted NRPE and run it locally, it worked. Running from Nagios Core, it gave me a big :P . I am thinking this may be a permissions issue, I am just not s...
by CLee1972
Mon Jun 04, 2018 3:26 pm
Forum: Open Source Nagios Projects
Topic: Different results for NRPE vs running locally
Replies: 8
Views: 3706

Re: Different results for NRPE vs running locally

If your command is this command[check_jstack]=/usr/bin/sudo /usr/local/nagios/libexec/check_jstack Then if you call this with check_nrpe it will use sudo The issue I am running into currently, Scott is if I use: "[root@ip-0-0-0-0 libexec]# /usr/local/nagios/libexec/check_jstack" on the lo...
by CLee1972
Mon Jun 04, 2018 1:57 pm
Forum: Open Source Nagios Projects
Topic: Different results for NRPE vs running locally
Replies: 8
Views: 3706

Re: Different results for NRPE vs running locally

Okay, so I have made some progress with this. I now have the "nagios" user in my sudoers group and I can run my script with the nagios user using "sudo /usr/local/nagios/libexec/check_jstack" with success. The issue I am having now is if I run the "/usr/local/nagios/libexec/...
by CLee1972
Fri Jun 01, 2018 3:42 pm
Forum: Open Source Nagios Projects
Topic: Different results for NRPE vs running locally
Replies: 8
Views: 3706

Re: Different results for NRPE vs running locally

Hello, CLee1972 . This is likely a permission issue. When nrpe executes the script it uses the "nagios" user, and when you execute it manually it runs under root. Try to change the user on the remote server: su - nagios And then run the command manually. Chances are that either the java o...
by CLee1972
Fri Jun 01, 2018 2:49 pm
Forum: Open Source Nagios Projects
Topic: Different results for NRPE vs running locally
Replies: 8
Views: 3706

Different results for NRPE vs running locally

Hello, I built a basic bin file to run JStack and output the results. This scripts runs fine locally but when using NRPE, it fails horribly, even on the local machine. My guess is the "wc" the script is using is not traversing NRPE correctly and this is why it is failing. I have attached a...
by CLee1972
Mon Apr 16, 2018 5:04 pm
Forum: Open Source Nagios Projects
Topic: check_logfiles - HOW TO??
Replies: 3
Views: 3495

Re: check_logfiles - HOW TO??

This is the file. Not sure if it is even configured properly? (Sorry it won't let me attach the file itself) package main; use strict; use utf8; use File::Basename; use File::Find; use Getopt::Long; #import Devel::TraceMethods qw( # Nagios::CheckLogfiles # Nagios::CheckLogfiles::Search # Nagios::Che...
by CLee1972
Mon Apr 16, 2018 1:51 pm
Forum: Open Source Nagios Projects
Topic: check_logfiles - HOW TO??
Replies: 3
Views: 3495

check_logfiles - HOW TO??

So, I am fairly novice when it comes to PERL and understanding what I need done. Here is my issue: I have a number of log files located in /var/log/sip/ named sipserver.log, sipserver.log.1, all the way up to sipserver.log.2999 and I need to be able to find events inside these logs labelled "**...
by CLee1972
Fri Mar 23, 2018 9:58 am
Forum: Open Source Nagios Projects
Topic: Installing NRPE Using the Install Script
Replies: 6
Views: 2222

Re: Installing NRPE Using the Install Script

Just a follow up. Using touch installed.firewall and touch skipped.firewall seemed to work like a charm. It came back with "Your firewall configuration was skipped" at the end of the script and did not turn on the iptables. Just to make sure I wasn't fully crazy, I decided to test another ...