Add Collectd as a Monitor Type
[doctor.git] / tests / lib / monitors / sample / sample
1 #!/bin/bash
2
3 function start_monitor_sample {
4     cp $TOP_DIR/lib/monitors/sample/monitor.py $TOP_DIR/monitor.py
5     pgrep -f "python monitor.py" && return 0
6     sudo -E python monitor.py "$COMPUTE_HOST" "$COMPUTE_IP" "$INSPECTOR_TYPE" \
7         > monitor.log 2>&1 &
8 }
9
10 function stop_monitor_sample {
11     pgrep -f "python monitor.py" || return 0
12     sudo kill $(pgrep -f "python monitor.py")
13 }
14
15 function cleanup_monitor_sample {
16     rm monitor.py
17     return
18 }