-
Notifications
You must be signed in to change notification settings - Fork 8
/
svc_perf
30 lines (25 loc) · 870 Bytes
/
svc_perf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
#
# IBM Storwize V7000 performance monitoring shell script for Zabbix
#
# Sends perf data from svc_perf_wbem.py to Zabbix with zabbix_sender
# Handles all caching and logging, called from /etc/cron.d/svc_perf_cron every 5 min.
#
# 2013 Matvey Marinin
#
# Usage:
# svc_perf <cluster>
#
# Arguments:
# cluster = Dns name or IP of Storwize V7000 block node (not Storwize V7000 Unified mgmt node!)
#
#
set -e
. /etc/zabbix/externalscripts/svc_perf.conf
CLUSTER=$1
CACHE_FILE=/var/cache/zabbix/svc_perf.$CLUSTER.cache
ERR_LOG=/var/cache/zabbix/svc_perf.$CLUSTER.errlog
echo >>"$ERR_LOG"
date >>"$ERR_LOG"
/usr/bin/python /etc/zabbix/externalscripts/svc_perf_wbem.py --cluster $CLUSTER --user "$SVC_USER" --password "$SVC_PWD" --cachefile "$CACHE_FILE" 2>>"$ERR_LOG" | zabbix_sender -z 127.0.0.1 -I 127.0.0.1 -T -i - >>"$ERR_LOG" 2>&1
date >>"$ERR_LOG"