Creating Custom Sensors
Use the System Settings > Sensor Management page to create and manage custom SQL sensors. Custom sensors allow you to define data to be collected by the OneDB Explore agent. Data from custom sensors can be graphed on a custom dashboard. You can also use custom sensors to define alerting conditions in OneDB Explore.
Each custom SQL sensor is based on a single SQL query to be run by the agent on the sysmaster database of the OneDB server being monitored. Any data that can be returned by a SQL query against sysmaster can be monitored by the agent.
Only System Administrative users of OneDB Explore can define custom SQL sensors. Once defined, custom sensors can be added to any server or group's monitoring profile.
To define a custom SQL sensor, go to the System Settings > Sensor Management page and click Create Sensor.
- SQL
- Define the SQL query to be run against the sysmaster database on the OneDB
server being monitored.
- Select a sample server to run the query against to preview the data.
- Optionally, specify the Transpose option to have the agent transpose (or pivot) the data returned by your SQL query based on a selected column.
- Optionally, specify a Primary Key column for your query.
- If your query returns multiple rows describing multiple objects (e.g. dbspaces), use the primary key column to define the unique identifier for each object.
- Define the SQL query to be run against the sysmaster database on the OneDB
server being monitored.
- Metrics
- Define a metric for each column returned by your query. Each metric will have:
- Name: A display name for the metric which will be used to display this metric's data in the OneDB Explore UI.
- Unit: Optional. Defining the unit as percentage or bytes will direct the OneDB Explore UI to format the sensor data values before they are displayed in the UI.
- Default Value: Optional. A default value to be used for the metric if the query returns null for that column.
- Calculate Delta: Optional. If enabled, the agent will store the difference per second between the latest reading and the previous reading.
- Define a metric for each column returned by your query. Each metric will have:
- Sensor Metadata
- A unique id for the sensor
- A display name for the sensor
- An optional description of the sensor
- A default run interval
- A default data retention interval