]> git.pld-linux.org Git - packages/cacti-template-nagiostats.git/blob - check_nagios.sh
- rfc compliant header termination
[packages/cacti-template-nagiostats.git] / check_nagios.sh
1 #!/bin/sh
2 # vim:ft=sh
3 # enable for debugging:
4 set -x
5 exec 2>>/tmp/nagios-cacti.log
6 #exec 1>&2
7
8 url="$1"
9 type="$2"
10 user="$3"
11 password="$4"
12
13 # Remove trailing slash if needed
14 url="${url%/}"
15
16 # pass user and password conditionally.
17 # this way we can even have passwords in them.
18 # retry only once with timeout of 30s
19 wget -t 1 -T 30 --no-check-certificate -q -O- ${user:+--user="$user" --password="$password"} "$url/mrtgstats.cgi?type=$type"
20 echo $? >&2
This page took 0.073695 seconds and 3 git commands to generate.