Search found 37 matches

by jankogaga
Thu Oct 10, 2019 6:53 am
Forum: Open Source Nagios Projects
Topic: Custom Nagios check
Replies: 3
Views: 1209

Re: Custom Nagios check

This solved the problem.
Once I moved ~/third-party-resources... to / everything works like a charm.

Thank you scottwilkerson!
by jankogaga
Wed Oct 09, 2019 7:01 am
Forum: Open Source Nagios Projects
Topic: Custom Nagios check
Replies: 3
Views: 1209

Custom Nagios check

Hi, I am running Nagios Core 4.4.3. I have been trying to create a custom check on my Nagios server. vi /usr/local/nagios/libexec/third-party-resources.sh #!/bin/bash number_of_char=$(~/third-party-resources-checker-master/bin/third-party-resources-checker -w ~/third-party-resources-checker-master/w...
by jankogaga
Thu Aug 29, 2019 9:18 am
Forum: Open Source Nagios Projects
Topic: How to call Python script within Nagios check
Replies: 13
Views: 8130

Re: How to call Python script within Nagios check

Thank you very much!
That has fixed the issue.
by jankogaga
Wed Aug 28, 2019 2:14 am
Forum: Open Source Nagios Projects
Topic: How to call Python script within Nagios check
Replies: 13
Views: 8130

Re: How to call Python script within Nagios check

With
su - nagios
/usr/bin/env python3 /usr/local/nagios/libexec/check_ssl.py -H google.com -c E+,E,E-,F+,F,F-,T,M,C+,C-,C,D+,D,D- -d 15

Code: Select all

/usr/bin/env: python3: No such file or directory
by jankogaga
Tue Aug 27, 2019 12:44 pm
Forum: Open Source Nagios Projects
Topic: How to call Python script within Nagios check
Replies: 13
Views: 8130

Re: How to call Python script within Nagios check

Here you are:

head -2 /usr/local/nagios/libexec/check_ssl.py

Code: Select all

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
for switching to nagios user:

Code: Select all

su nagios
by jankogaga
Tue Aug 27, 2019 11:52 am
Forum: Open Source Nagios Projects
Topic: How to call Python script within Nagios check
Replies: 13
Views: 8130

Re: How to call Python script within Nagios check

/etc/group has the following records: nagios:x:992:nrpe nagcmd:x:1000:nagios,apache Please note that a bunch of services already work with that configuration. The output of ls -l /usr/local/nagios/libexec/check_ssl* is -rwxr-xr-x 1 nagios nagios 8549 Aug 7 13:46 /usr/local/nagios/libexec/check_ssl.p...
by jankogaga
Tue Aug 27, 2019 6:09 am
Forum: Open Source Nagios Projects
Topic: How to call Python script within Nagios check
Replies: 13
Views: 8130

Re: How to call Python script within Nagios check

I have got the following message in Nagios WebGUI: (Return code of 127 is out of bounds. Check if plugin exists) When running a python script from the command line as nagios user, I have got: bash-4.2$ /usr/bin/env python3 /usr/local/nagios/libexec/check_ssl.py -H google.com -c E+,E,E-,F+,F,F-,T,M,C...
by jankogaga
Mon Aug 26, 2019 5:50 am
Forum: Open Source Nagios Projects
Topic: How to call Python script within Nagios check
Replies: 13
Views: 8130

Re: How to call Python script within Nagios check

Hi, Thank you for your reply. We run Nagios Core 4.4.3. In the same .cfg file for the host we have already working service definition like this: define service{ use local-service ; Name of service template to use host_name xxx service_description Swap Usage check_command check_local_swap!20!10 } Tha...
by jankogaga
Thu Aug 08, 2019 7:59 am
Forum: Open Source Nagios Projects
Topic: How to call Python script within Nagios check
Replies: 13
Views: 8130

How to call Python script within Nagios check

Hi, I would like to call Python script within Nagios check. Python script has the arguments. E.g.: /usr/local/nagios/libexec/check_ssl.py -H google.com -c E+,E,E-,F+,F,F-,T,M,C+,C-,C,D+,D,D- -d 15 and it works when I run in command line for nagios user. What I have tried and it didn't work for me: i...
by jankogaga
Thu May 24, 2018 2:17 am
Forum: Nagios XI
Topic: when pressing "Access NagiosXI" button I get an error
Replies: 33
Views: 5476

Re: when pressing "Access NagiosXI" button I get an error

No, thank you.
Please lock it up.