Hello Team,
How can I monitor a website's text content through a VPN connection?
An idea I have been trying so far is:
[root@2605 libexec]# ./check_vpn_master_test_1 -t pptp -H xxx.xx.10.46 -u <username> -p <password> -- require-mppe; ./check_http_content -U http://10.103.37.210/specialcalls.php -m "Communication Warning" -t 5
OK: VPN to 'xxx.xx.10.46' up and running on 'ppp0', 'http://10.103.37.210/specialcalls.php' reachable|time=0.053s;size=5138B
ERROR: CANNOT RETRIEVE URL: 500 Can't connect to 10.103.37.210:80 (timeout)
Is anyone aware of a plugin that utilizes a VPN connection before checking a website? The issue I am having is that the VPN check disconnects before checking the site contents-
Thank you!
Monitoring website content through VPN connection
Re: Monitoring website content through VPN connection
Can you set a higher timeout in the plugin?
Former Nagios Employee.
me.
me.
Re: Monitoring website content through VPN connection
I set the timeout to 300 seconds- I should start by asking if the ';' maintains the same check or just starts a new check?
[root@2605 libexec]# ./check_vpn_master_test_1 -t pptp -H xxx.xx.10.46 -u <username> -p <password> -- require-mppe; ./check_http_content -U http://10.103.37.210/specialcalls.php -m "Communication Warning" -t 300
OK: VPN to 'xxx.xx.10.46' up and running on 'ppp0', 'http://10.103.37.210/specialcalls.php' reachable|time=0.043s;size=5143B
ERROR: CANNOT RETRIEVE URL: 500 Can't connect to 10.103.37.210:80 (Connection timed out)
[root@2605 libexec]# ./check_vpn_master_test_1 -t pptp -H xxx.xx.10.46 -u <username> -p <password> -- require-mppe; ./check_http_content -U http://10.103.37.210/specialcalls.php -m "Communication Warning" -t 300
OK: VPN to 'xxx.xx.10.46' up and running on 'ppp0', 'http://10.103.37.210/specialcalls.php' reachable|time=0.043s;size=5143B
ERROR: CANNOT RETRIEVE URL: 500 Can't connect to 10.103.37.210:80 (Connection timed out)
Re: Monitoring website content through VPN connection
I tried this with another check - is this correct? The check comes back good but never reports the string:
define service{
use generic-service
host_name W Des Moines IA VPN
service_description W Des Moines xxxx Status Check TEST TEST TEST
check_command check_vpn_WD_IA_TOC!pptp!<username>!<password>!require-mppe!; ./check_http -H 10.103.13.242 -f follow -u "/service/status/inspire" -s "FAIL"
}
returns:
OK: VPN to 'xxx.xx.10.46' up and INSPIRE is running on 'ppp0', 'http://10.103.33.242' INSPIRE Status reachable
define service{
use generic-service
host_name W Des Moines IA VPN
service_description W Des Moines xxxx Status Check TEST TEST TEST
check_command check_vpn_WD_IA_TOC!pptp!<username>!<password>!require-mppe!; ./check_http -H 10.103.13.242 -f follow -u "/service/status/inspire" -s "FAIL"
}
returns:
OK: VPN to 'xxx.xx.10.46' up and INSPIRE is running on 'ppp0', 'http://10.103.33.242' INSPIRE Status reachable
Re: Monitoring website content through VPN connection
Or how can I use the website defacement wizard through a vpn connection?
Re: Monitoring website content through VPN connection
Are you using check_http or check_http_content? Just trying to understand the differences here. The default check_http plugin will be able to match strings with the -s parameter.
Former Nagios Employee
Re: Monitoring website content through VPN connection
I have tried both, I need a way to check strings once connected to a vpn-
The website defacement plugin would be beyond perfect if I could connect to the vpn first.
Is there a way to combine checks? For example run my check_vpn and any http string check at the same time?
Thank you!
The website defacement plugin would be beyond perfect if I could connect to the vpn first.
Is there a way to combine checks? For example run my check_vpn and any http string check at the same time?
Thank you!
Re: Monitoring website content through VPN connection
You could create a wrapper script, that connects to the VPN first, and then executes the check_http plugin statically in it. Then, assign this wrapper script as a command, and assign it to the service.
Former Nagios Employee
Re: Monitoring website content through VPN connection
Thank you!
Would you happen to have an example that I could see?
Would you happen to have an example that I could see?
Re: Monitoring website content through VPN connection
Something like -
This would run through the openvpn command first, and then execute the check_http after doing so.
Code: Select all
!#/bin/bash
openvpn --config vpn.ovpn --auth-usuer-pass file.txt
/usr/local/nagios/libexec/check_http <your parameters>
Former Nagios Employee