Search found 5 matches

by ronhow
Thu Aug 31, 2023 7:52 am
Forum: Nagios XI
Topic: Custom Script and Python Version
Replies: 3
Views: 4232

Re: Custom Script and Python Version

If I add print(requests.__file__) print(platform.python_version()) to my script and run it from command line it runs as expected and the print line gives output: /usr/local/lib/python3.6/site-packages/requests/__init__.py 3.6.8 However if I run same script from Nagios itself, I get no output. If I c...
by ronhow
Thu Aug 31, 2023 5:56 am
Forum: Nagios XI
Topic: Custom Script and Python Version
Replies: 3
Views: 4232

Re: Custom Script and Python Version

Hi Laura, Thanks very much for the feedback. I've never created any such file and I am not aware of anyone on my team that has either. I've checked for presence of any requests (ending in.py or .pyc) anywhere on the system - but don't find any result so that doesn't appear to be it. If I run the scr...
by ronhow
Wed Aug 30, 2023 9:33 am
Forum: Nagios XI
Topic: Custom Script and Python Version
Replies: 3
Views: 4232

Custom Script and Python Version

Hello, I am attempting to use a custom command to perform a Service Check. I am added a Python script to /usr/local/nagios/libexec. I have created the command itself: /usr/bin/python3 $USER1$/my_script.py $ARG1$ $ARG2$ $ARG3$ Within my script: #!/usr/bin/python3 import requests However, I will get e...
by ronhow
Tue Jun 13, 2023 7:51 am
Forum: Nagios XI
Topic: Configure Event Handlers per Service using API
Replies: 1
Views: 394

Re: Configure Event Handlers per Service using API

So I was able to get this working using the same parameters, but the PUT endpoint.
by ronhow
Tue Jun 13, 2023 4:39 am
Forum: Nagios XI
Topic: Configure Event Handlers per Service using API
Replies: 1
Views: 394

Configure Event Handlers per Service using API

Hello, We are on Nagios XI 5.9.1. I have a few services which I would like to configure Event Handler for. Ideally I would do this in bulk. The Bulk Modifications tools allows enabling an Event Handler per Service, but there does not appear to be a way to specify the command which should run. I have...