]> git.pld-linux.org Git - packages/cacti-template-nagiostats.git/blame - check_nagios.sh
- drop obsolete and outdated manual inclusion of rpm macros
[packages/cacti-template-nagiostats.git] / check_nagios.sh
CommitLineData
7f553a10 1#!/bin/sh
7f553a10 2# enable for debugging:
616d7122
ER
3#set -x
4#exec 2>>/tmp/nagios-cacti.log
7f553a10
ER
5
6url="$1"
7type="$2"
8user="$3"
9password="$4"
10
11# Remove trailing slash if needed
12url="${url%/}"
13
ec00db12
ER
14if [ -z "$url" ]; then
15 echo >&2 "Usage: $0 URL TYPE [USER PASSWORD]"
16 exit 1
17fi
18
7f553a10
ER
19# pass user and password conditionally.
20# this way we can even have passwords in them.
21# retry only once with timeout of 30s
ad3b4efe 22exec wget -t 1 -T 30 --no-check-certificate -q -O- ${user:+--user="$user" --password="$password"} "$url/mrtgstats.cgi?type=$type"
This page took 0.082631 seconds and 4 git commands to generate.