majoan
majoan

Reputation: 1

How to show the output in Geneos Active console using Toolkit Plugin

I'm new with Geneos and would like to know how to show the output of our existing script which is previously used in Nagios. We're planning to use the toolkit plugin and not sure what will be the commands to use to be able to see result in active console. Requirement - check the log if there is session timeout and it will alert OK if grep is equal 20 then Warning alert if less or greater than 20.

Output in Geneos:

column_title - TIMEOUT CHECK, STATUS

row_result - THE_FILE, OK: Session Timeout is 20

Here's our sample script:

#!/bin/ksh

OK=0
WARNING=1
CRITICAL=2

THE_FILE=/target/directory/web.txt
TIMEOUT=`grep "<session-timeout>" $THE_FILE | awk -F'>' '{print $2}' | awk -F'>' '{print $1}'

if [$TIMEOUT -eq 20 ]; then
    echo "OK: Session Timeout is $TIMEOUT"
    exit $OK
else
    echo "WARNING: Session Timeout is $TIMEOUT"
    exit $WARNING
fi

Thanks!

Upvotes: 0

Views: 1797

Answers (1)

nobody
nobody

Reputation: 23

You can use the same script (adding the header) and adding it to Geneos. But I highly recommend you to use a FKM sampler, and check this log file using Geneos directly.

Hope this helps you.

Upvotes: 0

Related Questions