I come from an administrative background, but I've been tasked with setting up critical monitoring for a couple EMS devices. I built out shell scripts to make things work, and then when I upgraded, Splunk says the alert script is deprecated. I've read the documentation, but I can't can't figure out why I have to configure three files as opposed to one script with var binds. Seemed easier before. Anyway, can someone give me the basics in converting a simple telnet script that loads messaging to our monitoring tool via a listener file? Here's the script that I currently have:
#!/bin/bash
# Script to send alerts to monitoring tool
connection="x.x.x.x 10000"
( echo open ${connection}
echo $1
sleep 1
echo "BOR"
echo "`date`"
echo ""
echo $4
echo ""
echo "EOR"
sleep 2
) | telnet
exit 0
↧