Skip to main content

Set up a notification channel

Set up a notification channel so nullplatform can send scope service actions to your runner.

Create an agent notification channel

To configure this, use our CLI or send a POST request with the endpoint details.

Example request

np notification channel create \
--body '{
"nrn": "organization=1:account=2:namespace=3:application=4",
"source": ["service"],
"type": "agent",
"configuration": {
"api_key": "AAAA.1234567890abcdef1234567890abcdefPTs=",
"command": {
"data": {
"cmdline": "/root/.np/services/entrypoint --service-path=/root/.np/services/kubernetes",
"environment": { "NP_ACTION_CONTEXT": "${NOTIFICATION_CONTEXT}" }
},
"type": "exec"
},
"selector": {}
},
"filters": {
"service.specification.slug": "$service-spec-slug"
}
}'
Request details
  • nrn: The NRN of the resource (including child resources) where the action applies.
  • source: The system emitting the notification. For custom scopes, set this to service.
  • type: The type of notification channel. For custom scopes, use agent.
  • configuration: Configuration options for the agent.
    • api_key: The API key for the agent.
    • command: Describes the command the agent will execute.
  • filters: MongoDB-style query that filters which service notifications trigger the runner.

See the API docs for more information on this request.

Once your channel is set up, nullplatform will start relaying events to your runner when relevant service actions are triggered.