Fetch monitoring data
You can retrieve monitoring data stored in a .dat file.
You may need to retrieve the monitoring data stored in a .dat file to transfer data to a database or to a third party monitoring system where the monitoring data is processed and managed. If there are several .dat files for a session, each fetch command reads the oldest .dat file. As a result, if you run several fetch commands against the same session, the events will be fetched in chronological order.
gasadmin monitoring fetch --file mydata.csv d98290172c8f7c0d861db329f1ce6597
xml.StaxReader.readFromPipe()
to retrieve the monitoring data in XML
format:CALL stax.readFromPipe("gasadmin monitoring fetch --quiet --xml-output d98290172c8f7c0d861db329f1ce6597")
The --quiet
option in the command line suppresses the diagnostic first line of
the output, Fetching monitoring data for session :d98290172c8f7c0d861db329f1ce6597
,
which is not valid XML. Therefore, by adding the --quiet
option, the Stax reader
does not throw the error, Invalid XML document
.