Initial commit, first functionality implemented :-)
[nagcollect.git] / client / bin / nagcollect
1 #!/bin/bash
2 #
3 # NagCollect -- Nagios Data Collector for Passive Checks
4 # Copyright (c)2009 Alexander Barton, alex@barton.de
5 #
6
7 if [ "$1" = "--help" -o "$1" = "-h" -o $# -lt 5 -o $# -gt 6 ]; then
8         echo "Usage: $0 <server-url> <key> <host> <status> <service> [<text>]"
9         exit 1
10 fi
11
12 curl --insecure --include \
13         --data-urlencode "key=$2" \
14         --data-urlencode "host=$3" \
15         --data-urlencode "status=$4" \
16         --data-urlencode "service=$5" \
17         --data-urlencode "text=$6" \
18         "$1"
19
20 # -eof-