This adds initial support for snapshot, the idea is:
If running on the OneAgent:
Find the config directory
Find the log directory by parsing installation.conf from the config directory
Parse the oneagent_latest_snapshot.log from log_dir/plugin/oneagent_latest_snapshot.log
If running in dt-sdk run
The user can OPTIONALLY pass a parameter to self.get_snapshot()
If the parameter exists, we parse the file from that parameter
If the parameter doesn't exist, we parse snapshot.json
Example usage:
process_snapshot = self.get_snapshot()
for entry in process_snapshot.entries:
for process in entry.processes:
if process.process_name in ("squid", "squid.exe")
self.extract_squid_metrics(process)
This adds initial support for snapshot, the idea is:
If running on the OneAgent:
installation.conf
from the config directoryoneagent_latest_snapshot.log
fromlog_dir/plugin/oneagent_latest_snapshot.log
If running in dt-sdk run
self.get_snapshot()
snapshot.json
Example usage: