A concourse resource to send pipeline events to VMware Tanzu Observability by Wavefront
tenant_url
: The URL to your tenant, for examplehttps://longboard.wavefront.com
api_token
: A REST API token. More information on generating an API token here
Currently, this resource does not support monitoring for new events.
Fetches the given event, and creates the following files:
id
: contains the event's IDevent.json
: represents the event object as returned by the API
Note: Because this resource does not support monitoring, the in
script is
really only used in a get-after-put
context. It is used to pass the event
between jobs in a pipeline so that it may be started in one job and ended in a
subsequent job.
Depending on the action
parameter, out
will either create a new event with
a running state of ONGOING
, or close an event with the given ID.
-
action
: Required. One ofcreate
,start
, orend
. -
event
: Required if action isend
, ignored if action isstart
orcreate
. The path to a previous event'sget
step, containing itsid
file. -
event_name
: Required if action isstart
orcreate
, ignored if action isend
. The name of the event to be created -
annotations
: Optional. A map of key-value pairs that will be added as annotations to the event. Values MUST be strings. In addition to any annotations specified here, the following annotations will be added:concourse-team: ${BUILD_TEAM_NAME} concourse-pipeline: ${BUILD_PIPELINE_NAME} concourse-job: ${BUILD_JOB_NAME} concourse-build-url: ${ATC_EXTERNAL_URL}/builds/${BUILD_ID}
Learn more about environment variables available to the resource type here
If you do not want one of those annotations on your event, add it as a custom annotation with a value of
""
.If annotations are set on a
put
withaction == "end"
, those annotations will be added or updated on the original event. This is useful, for example, for changing theseverity
annotation fromINFO
toFAILED
, or something similar. -
tags
: Optional, ignored if action isend
. A list of strings to be added as tags on the event.
Note: event_name
, annotations
, and tags
support very simple variable interpolation. For the list of
allowed variables, see here
and for a list of substitution patterns, see here.
resource_types:
- name: observability-events
type: registry-image
source:
repository: projects.registry.vmware.com/tanzu/observability-event-resource
tag: "1"
resources:
- name: observability
type: observability-events
source:
tenant_url: https://longboard.wavefront.com
api_token: ((my-secret-wavefront-token))
jobs:
- name: start-event
plan:
- put: observability
params:
action: start
event_name: Pipeline Started
tags: ["${BUILD_PIPELINE_NAME}"]
annotations:
severity: INFO
- name: do-a-thing
plan:
- get: observability
passed: [start-event]
trigger: true
- task: do-some-stuff
config: ...
- name: end-event
plan:
- get: observability
passed: [do-a-thing]
trigger: true
- put: observability
params:
action: end
event: observability
annotations:
severity: SUCCESS