Hi,
So I want to tail a log file that greps for a number and then have Solarwinds make a graph over time. When I run this script on the machine it works fine and returns my result about every 10 seconds. I tried using the script monitor template in Solarwinds but when i try to test it just hangs there. I need to script to return a value whenever it writes it to the log but I'm not sure Solarwinds can poll that fast. Can anyone help?
Here's my script.
#!/bin/bash
tail -f /opt/harvest/log/harvest.log | while read line; do echo "$line" | grep "Get Eligible SSC" | cut -d ' ' -f 12 | cut -d 's' -f 1; done