2 # enable for debugging:
4 #exec 2>>/tmp/nagios-cacti.log
11 # Remove trailing slash if needed
14 if [ -z "$url" ]; then
15 echo >&2 "Usage: $0 URL TYPE [USER PASSWORD]"
19 # pass user and password conditionally.
20 # this way we can even have passwords in them.
21 # retry only once with timeout of 30s
22 exec wget -t 1 -T 30 --no-check-certificate -q -O- ${user:+--user="$user" --password="$password"} "$url/mrtgstats.cgi?type=$type"