Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- HOST=`/bin/hostname`
- SERVER='zabbix.yourdomain.com'
- CURL=/usr/bin/curl
- read -a stat <<< `$CURL -sm3 "http://${HOST}/nginx_status"`
- [ ! -z $stat ] && {
- echo "\
- ${HOST} nginx.active ${stat[2]}
- ${HOST} nginx.accepts ${stat[7]}
- ${HOST} nginx.handled ${stat[8]}
- ${HOST} nginx.requests ${stat[9]}
- ${HOST} nginx.reading ${stat[11]}
- ${HOST} nginx.writing ${stat[13]}
- ${HOST} nginx.waiting ${stat[15]}" |
- ~/zabbix/bin/zabbix_sender \
- --zabbix-server ${SERVER} -s ${HOST} \
- --port '10051' -i - >/dev/null 2>&1
- }
- echo "1"
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement