Page 1 of 1
website montoring help
Posted: Wed Sep 22, 2021 1:56 pm
by localit
I have a powershell script now that monitors a website value via ns client.
Is there a way i can configure the same thing on my centos server that Nagios sits on to do the same thing.
reason i need this is because this website sits on different network , i don't want a dedicated desktop just for this check. I have my Nagios network configured to talk to same network the website is on.
for check_xi_service_http_content command , does it require a client to run this ?
any help would be appreciated.

Re: website montoring help
Posted: Thu Sep 23, 2021 12:20 pm
by ssax
You should be able to use Configure > Configuration Wizards > JSON wizard if it's returning JSON.
You could also use Configure > Configuration Wizards > Website URL wizard:
- Make sure to choose Follow for the redirects
- Use the URL Content or Regex match to match against the data
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
OR this which requires the jq package:
Code: Select all
#!/bin/bash
# 'yum install jq' first
LEDImage=$(curl -k -L --max-time 60 --silent "http://192.168.44.12/go/getdata?catagory=index&cmd=index" | jq '.LEDImage')
if [[ "$LEDImage" -eq '13' ]]; then
echo '0 - Booster working'
exit 0
else
echo '2 - Booster not working!'
exit 2
fi
Re: website montoring help
Posted: Thu Sep 23, 2021 1:33 pm
by localit
ty for the response , so is the tool using the command prompt on the Navori server its self to run the command? it doesn't require any kind of ns client on a workstation correct?
another situation i am running into is , the device/website i am trying to monitor has ping blocked but port 80 is open, since the website tool requires a host/ip in this situation what do i need to do to take it out in order to scan the website content via port 80?
Re: website montoring help
Posted: Fri Sep 24, 2021 12:16 pm
by ssax
Correct, it essentially uses the CLI on the XI server for those. Some plugins are meant to be run from XI server, some are meant to be run through an agent such as NCPA/NRPE/NSClient++.
Just run through the Website or Website URL wizard with port 80 and the services will use port 80, then host check will then use check_http with port 80 as well (ping will not be used by default for the website wizard hosts).