And putting a script that consumes the log and sends it to Instana will be feasible,
#Var
LOGREAD=/opt/instana/instana-agent/data/log/agent.log
LOGWRITE=/opt/instana/instana-agent/data/customScripts/monitorScript.log
URL="http://localhost:42699/com.instana.plugin.generic.event"
DESCR1='{"title":"TSE_OracleDB_CRI", "text": "'
DESCR2='", "duration": 300000, "severity": 10, "incident": true}'
JSON="Content-Type: application/json"
#read log
tail -n 0 -f $LOGREAD | grep --line-buffered ERROR | grep --line-buffered OracleDB | while read LINE;
do
MESSAGE="$(cut -d'|' -f6 <<<"$LINE")"
echo $MESSAGE >> $LOGWRITE
EVENTO=$DESCR1$MESSAGE$DESCR2
echo "$EVENTO" >> $LOGWRITE
content="$(curl -XPOST "$URL" -H "$JSON" -d "$EVENTO")"
done
------------------------------
saury granados
ing
GBM Corporation
San José
506-22843999
------------------------------
Original Message:
Sent: Wed January 31, 2024 02:22 AM
From: Ronny Hammar
Subject: How to monitor logs with instanta?
Hi , instana only collect warnings and errors from log in curret releases. Its not user configurble for now.
------------------------------
Ronny Hammar
Original Message:
Sent: Tue January 30, 2024 04:25 PM
From: saury granados
Subject: How to monitor logs with instanta?
I have Instana installed on a Windows server, but we need Instana to be able to see a log of an application, how can I add this log so that Instana consumes it?
------------------------------
saury granados
ing
GBM Corporation
San José
506-22843999
------------------------------