Events

Learn about events, the event types, and how events are reported.


This documentation applies to NGINX Instance Manager 2.0.0 and later.


Overview

The Events API shows the events that have occured on the NGINX Instance Manager. Currently, the Instance Manager reports Agent Status events that will give you insight into the NGINX Config Applies and the NGINX Agent status.

Querying the Events API

This section provides an overview of how to query the Events API.

curl -X GET --url "{manager-IP}/api/v1/analytics/events
{
	"Metadata": {
		"pagination": {
			"links": {
				"next": {},
				"prev": {}
			},
			"pageToken": "1639453182"
		}
	},
	"items": [{
		"category": "agent status",
		"dimensions": {
			"alias": "alias",
			"hostname": "hostname",
			"instance": "instance",
			"nginx_id": "nginx_id",
			"system_id": "system_id",
		},
		"id": "uuid",
		"level": "INFO",
		"message": "successfully applied config on <instance>",
		"status": "Config Apply Success",
		"timestamp": "2021-12-14T01:03:11Z"
	}, {
		"category": "agent status",
		"dimensions": {
			"alias": "alias",
			"hostname": "hostname",
			"instance": "instance",
			"nginx_id": "nginx_id",
			"system_id": "system_id",
		},
		"error": "Config apply failed (write): Error running nginx -t exit status 1",
		"id": "uuid",
		"level": "INFO",
		"message": "failed to apply nginx config on <instance>",
		"status": "Config Apply Failure",
		"timestamp": "2021-12-14T00:57:48Z"
	},{
		"category": "agent status",
		"dimensions": {
			"alias": "alias",
			"hostname": "hostname",
			"instance": "instance",
			"nginx_id": "nginx_id",
			"system_id": "system_id"
		},
		"id": "uuid",
		"level": "INFO",
		"message": "nginx-agent v2.1.6 stopped on <instance>",
		"status": "Agent Stop",
		"timestamp": "2021-12-13T20:08:49Z"
	}, {
		"category": "agent status",
		"dimensions": {
			"alias": "alias",
			"hostname": "hostname",
			"instance": "instance",
			"nginx_id": "nginx_id",
			"system_id": "system_id",
		},
		"id": "uuid",
		"level": "INFO",
		"message": "nginx-agent v2.1.6 started on <instance>",
		"status": "Agent Start",
		"timestamp": "2021-12-13T03:20:00Z"
	}]
}