Opsview 6.8.x End of Support
With the release of Opsview 6.11.0 on February 2025, versions 6.8.x have reached their End of Support (EOS) status, according to our Support policy. This means that versions 6.8.x will no longer receive code fixes or security updates.
The documentation for version 6.8.9 and earlier versions will remain accessible for the time being, but it will no longer be updated or receive backports. We strongly recommend upgrading to the latest version of Opsview to ensure continued support and access to the latest features and security enhancements.
Notification - Listing
Parameters:
rows
— number of rows returned, default 50. Can specify “all”.page
— page of data to return. Default 1.hostgroupid
— filters by this host group id. Optional. Can specify multiple times. Will find all hosts from this part of the host group downwards.hostname
— host name to filter notifications on. Optional. Can specify multiple times. Substring search - use % as the wildcard.servicename
— service name to filter on. Optional. Can specify multiple times. Substring search - use % as the wildcard. This will include host objects in the result.type
— 0 = host, 1 = service. Can be specified multiple times. Can use either the key (0) or the value (host). Optional. If not specified, will use both.order
— this parameter is not currently supported. The ordering is by notification time descending.service_state
— filter by service state id or name. Optional. Can be repeated.host_state
— filter by host state id or name. Optional. Can be repeated.start
— start time in epoch seconds. Can use -3600 for 3600 seconds ago. Default -86400 (1 day).end
— end time in epoch seconds. Default now.servicesonly
— if set, then only return service objects, otherwise will also include the host. Default 0.
Limitations:
If you filter by service name, you will get results for all hosts, whether they have the specified service or not.
Example output:
{
"list": [
{
"type": "1", // 0=host, 1=service
"name": "opsview::HTTP", // For a service. Host would be "opsview"
"time": "1234567890", // Unix epoch seconds
"output": "OK - localhost: rta 0.0.29ms lost 0%",
// Output for object at time of notification
"state": "0", // Possible values for host: 0=up, 1=down, 2=unreachable
// For services: 0=ok, 1=warning, 2=critical, 3=unknown
"notificationtype": "0", // 0=NORMAL, 1=ACKNOWLEDGEMENT, 2=FLAPPINGSTART, 3=FLAPPINGSTOP, 4=FLAPPINGDISABLED, 5=DOWNTIMESTART, 6=DOWNTIMEEND, 7=DOWNTIMECANCELLED, 8=CUSTOM
"profiles": [
{
"name": "Personal profile",
"users": [ "alex" ], // This will only be one entry, but in future for BSM, maybe multiple
"nm": [ "1", "3" ], // Notification methods used for this notification. See key for the notification methods
},
{
"name": "Some shared notification profile",
"users": [ "cbalsdon" ],
"nm": [ "1", "4", "5" ]
},
{
"name": "Some shared notification profile",
// This is same as above profile, but cannot be collapsed yet. This may change in future
"users" : [ "smarsh" , "alex" ],
"nm" : [ "1", "4", "5" ]
}
]
}
],
"nms": { // Key of notification methods
"1": "com.opsview.notificationmethods.aql",
"2": "com.opsview.notificationmethods.email",
"3": "com.opsview.notificationmethods.pagerduty",
"4": "com.opsview.notificationmethods.smsgateway",
"5": "custom",
},
"summary": {
"total":"150" // Total number of records used
}
}