ActiveXperts Knowledge Base Article 7740330
To retrieve monitoring data from ActiveXperts Network Monitor, you can use the statistics database.
The statistics database is typically an MS SQL database. However, by default, a SQL Compact Edition (SDF) database is used.
But most users migrate the statistics database to MS SQL Server to store more data and optimize the performance of the Reports and Graphs tools.
There are three useful tables for retrieving data using MS SQL queries:
- The "ReportData" table
- The "GraphData" table
- The "Results" table
The "Results" table contains all possible results of a check. The result values are used in the "ReportData" and "GraphData" tables. These tables have foreign keys to the "Results" table.
The "ReportData" table is used by the Reports tool. It contains only the status changes of a check. Therefore, each time a check's status changes, a record is written. If the status doesn't change for a few minutes, only the time field is updated. Therefore, the records with the most recent time contain the current status of the check. Each record contains the ID, result, data value, and timestamp of the check.
The graphing tools use the "GraphData" table. For each check, a new record is written periodically (configurable, by default every 5 minutes) and with each status change. Each record contains the ID, result, data value, and timestamp of the check.
The Timestamp field is a Unix epoch value, i.e., the number of seconds since January 1, 1970, at 00:00:00 UTC.
So, to retrieve the most recent GraphData record for the Check with ID=10500, you can perform the following query:
SELECT TOP 1 * FROM GraphData WHERE CheckID = 10500 ORDER BY TimeSecs DESC;
And similar, to retrieve the most recent ReportData record for the Check with ID=10500, you can perform the following query:
SELECT TOP 1 * FROM ReportData WHERE CheckID = 10500 ORDER BY TimeSecs DESC;
If you cannot find an answer to your question(s) in our Knowledge Base, or if you need additional information or assistance, please contact our Customer Support using our Contact Support Form
