#!/bin/bash

. /etc/onapp.conf

if [[ $2 == "started" ]]; then
    snmptrap -v 2c -c onapp ${HOST}:${VM_STATUS_SNMP_PORT} "" .1.3.6.1.4.1.40442.10.2 s s "$2 $1";
elif [[ $2 == "stopped" || $2 == "restarted" ]]; then
    snmptrap -v 2c -c onapp ${HOST}:${VM_STATUS_SNMP_PORT} "" .1.3.6.1.4.1.40442.10.2 s s "$2 $1";
fi
