]> git.pld-linux.org Git - packages/cacti-template-nagiostats.git/blame - check_nagios.sh
- rfc compliant header termination
[packages/cacti-template-nagiostats.git] / check_nagios.sh
CommitLineData
7f553a10
ER
1#!/bin/sh
2# vim:ft=sh
3# enable for debugging:
4set -x
5exec 2>>/tmp/nagios-cacti.log
6#exec 1>&2
7
8url="$1"
9type="$2"
10user="$3"
11password="$4"
12
13# Remove trailing slash if needed
14url="${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
19wget -t 1 -T 30 --no-check-certificate -q -O- ${user:+--user="$user" --password="$password"} "$url/mrtgstats.cgi?type=$type"
20echo $? >&2
This page took 0.078013 seconds and 4 git commands to generate.