Returns the current time for the MC server and the timezone of the location where the MC server is located.
1 - MC-User-ApiKey
The MC-User-ApiKey is a user-specific key used with Management Console.
The MC-User-ApiKey is a user-specific key used with Management Console. Users must have an MC-User-ApiKey to interact with MC using the Rest API. All users with roles other than None automatically receive an MC-User-ApiKey.
This key grants users the same rights through the API that they have available through their MC roles. To interact with the MC, users pass the key in the request header for the API.
View the MC-User-ApiKey
If you are the database administrator, you can view the MC-User-ApiKey for all users. Individual users can view their own keys.
Connect to MC and go to MC Settings > User Management.
Select the user to view and click Edit. The user's key appears in the User API Key field.
2 - GET alerts
Returns a list of MC alerts, their current status, and database properties.
Returns a list of MC alerts, their current status, and database properties.
The maximum number of alerts to retrieve. If the limit is lower than the number of existing alerts, Vertica retrieves the most recent alerts. Used with the type parameter, Vertica retrieves up to the limit for each type. For example, for a limit of five and types of critical and emergency, you could receive up to ten total alerts.
time_from
The timestamp start point from which to retrieve alerts. You can use this parameter in combination with the time_to parameter to retrieve alerts for a specific time range. Values must be passed in the following format: yyyy-MM-ddTHH:mm.
If you provide only the time_from parameter, and omit the time_to parameter, the response contains all alerts generated from the time_from parameter to the current time.
time_to
The timestamp end point from which to retrieve alerts. You can use this parameter in combination with the time_from parameter to retrieve alerts for a specific time range. Values must be passed in the following format: yyyy-MM-ddTHH:mm.
If you provide only the time_to parameter, and omit the time_from parameter, the response contains all alerts generated from the earliest possible time to the time passed in time_to.
This example shows how you can request alerts using cURL. In this example, the limit parameter is set to '2' and the types parameters is set to info and notice:
Request the alert to a specific end point using the time_to parameter. When you use the time_to parameter without the time_from parameter, the time_from parameter defaults to the oldest alerts your MC contains:
[
{
"alerts":[
{
"id":9,
"markedRead":false,
"eventTypeCode":2,
"create_time":"2015-11-05 15:10:53.391",
"updated_time":"2015-11-05 15:10:53.391",
"severity":"notice",
"status":1,
"databaseName":"mydb",
"databaseId":1,
"clusterName":"1446668057043_cluster",
"description":"Workload analyzed successfully",
"summary":"Analyze Workload operation has succeeded on Database",
"internal":false,
"count":1
},
{
"id":8,
"markedRead":false,
"eventTypeCode":2,
"create_time":"2015-11-05 15:10:31.16",
"updated_time":"2015-11-05 15:10:31.16",
"severity":"notice",
"status":1,
"databaseName":"mydb",
"databaseId":1,
"clusterName":"1446668057043_cluster",
"description":"Analyze Workload operation started on Database",
"summary":"Analyze Workload operation started on Database",
"internal":false,
"count":1
},
{
"id":7,
"markedRead":false,
"eventTypeCode":2,
"create_time":"2015-11-05 00:15:00.204",
"updated_time":"2015-11-05 00:15:00.204",
"severity":"alert",
"status":1,
"databaseName":"mydb",
"databaseId":1,
"clusterName":"1446668057043_cluster",
"description":"Workload analyzed successfully",
"summary":"Analyze Workload operation has succeeded on Database",
"internal":false,
"count":1
},
{
"id":6,
"markedRead":false,
"eventTypeCode":2,
"create_time":"2015-11-04 15:14:59.344",
"updated_time":"2015-11-04 15:14:59.344",
"severity":"notice",
"status":1,
"databaseName":"mydb",
"databaseId":1,
"clusterName":"1446668057043_cluster",
"description":"Workload analyzed successfully",
"summary":"Analyze Workload operation has succeeded on Database",
"internal":false,
"count":1
},
{
"id":5,
"markedRead":false,
"eventTypeCode":2,
"create_time":"2015-11-04 15:14:38.925",
"updated_time":"2015-11-04 15:14:38.925",
"severity":"notice",
"status":1,
"databaseName":"mydb",
"databaseId":1,
"clusterName":"1446668057043_cluster",
"description":"Analyze Workload operation started on Database",
"summary":"Analyze Workload operation started on Database",
"internal":false,
"count":1
},
{
"id":4,
"markedRead":false,
"eventTypeCode":0,
"create_time":"2015-11-04 15:14:33.0",
"updated_time":"2015-11-05 16:26:17.978",
"severity":"notice",
"status":1,
"nodeName":"v_mydb_node0001",
"databaseName":"lmydb",
"databaseId":1,
"clusterName":"1446668057043_cluster",
"description":"Workload analyzed successfully",
"summary":"Analyze Workload operation has succeeded on Database",
"internal":false,
"count":1
},
{
"id":3,
"markedRead":false,
"eventTypeCode":2,
"create_time":"2015-11-04 15:14:32.806",
"updated_time":"2015-11-04 15:14:32.806",
"severity":"info",
"status":1,
"hostIp":"10.20.100.64",
"nodeName":"v_mydb_node0003",
"databaseName":"mydb",
"databaseId":1,
"clusterName":"1446668057043_cluster",
"description":"Agent status is UP on IP 127.0.0.1",
"summary":"Agent status is UP on IP 127.0.0.1",
"internal":false,
"count":1
},
{
"id":2,
"markedRead":false,
"eventTypeCode":2,
"create_time":"2015-11-04 15:14:32.541",
"updated_time":"2015-11-04 15:14:32.541",
"severity":"info",
"status":1,
"hostIp":"10.20.100.63",
"nodeName":"v_mydb_node0002",
"databaseName":"mydb",
"databaseId":1,
"clusterName":"1446668057043_cluster",
"description":"Agent status is UP on IP 127.0.0.1",
"summary":"Agent status is UP on IP 127.0.0.1",
"internal":false,
"count":1
},
{
"id":1,
"markedRead":false,
"eventTypeCode":2,
"create_time":"2015-11-04 15:14:32.364",
"updated_time":"2015-11-04 15:14:32.364",
"severity":"info",
"status":1,
"hostIp":"10.20.100.62",
"nodeName":"v_mydb_node0001",
"databaseName":"mydb",
"databaseId":1,
"clusterName":"1446668057043_cluster",
"description":"Agent status is UP on IP 127.0.0.1",
"summary":"Agent status is UP on IP 127.0.0.1",
"internal":false,
"count":1
}
],
"total_alerts":9,
"request_query":"db_name=mydb",
"request_time":"2015-11-05 16:26:21.679"
}
]
6 - Combining sub-category filters with category filters
You can combine category filters with sub-category filters, to obtain alert messages for specific thresholds you set in MC.
You can combine category filters with sub-category filters, to obtain alert messages for specific thresholds you set in MC. You can also use sub-category filters to obtain information about alerts on specific resource pools in your database.
Sub-category filters
You can use the following sub-category filters with the category filters. Sub-category filters are case sensitive and must be lowercase.
Sub-Category Filter
Alerts Related to Threshold Value Set For:
THRESHOLD_NODE_CPU
Node CPU
THRESHOLD_NODE_MEMORY
Node Memory
THRESHOLD_NODE_DISK_USAGE
Node Disk Usage
THRESHOLD_NODE_DISKIO
Node Disk I/O
THRESHOLD_NODE_CPUIO
Node CPU I/O Wait
THRESHOLD_NODE_REBOOTRATE
Node Reboot Rate
THRESHOLD_NETIO
Network I/O Error
THRESHOLD_QUERY_QUEUED
Queued Query Number
THRESHOLD_QUERY_FAILED
Failed Query Number
THRESHOLD_QUERY_SPILLED
Spilled Query Number
THRESHOLD_QUERY_RETRIED
Retried Query Number
THRESHOLD_QUERY_RUNTIME
Query Running Time
Resource pool-specific sub-category filters
To retrieve alerts for a specific resource pool, you can use sub-category filters in combination with the following category filters:
thresholds
rp_name
If you use these sub-category filters without the RP_NAME filter, the query retrieves alerts for all resource pools in your database.
Sub-Category Filter
Alerts Related to Threshold Value Set For:
THRESHOLD_RP_QUERY_MAX_TIME
Queries reaching the maximum allowed execution time.
THRESHOLD_RP_QUERY_RESOURCE_REJECT
The number of queries with resource rejections.
THRESHOLD_RP_QUERY_QUEUE_TIME
The number of queries that ended because of queue time exceeding a limit.
THRESHOLD_RP_QUERY_RUN_TIME
The number of queries that ended because of run time exceeding a limit.
Combine the thresholds category filter with a sub-category filter
This example shows how you can request alerts using cURL with the thresholds category filter and a sub-category filter. You apply the following filters:
This example shows how you can request alerts using cURL on a specific resource pool. The name of the resource pool is resourcepool1. You apply the following filters: