Skip to content

Consider handling labels for nagios watchers (e.g. via annotations) #2269

@RamblingCookieMonster

Description

@RamblingCookieMonster

Apologies for any improper phrasing / terminology, and do please feel free to close this if it does not make sense (in general, or for this specific project), etc.

It might be nice to allow the inclusion of user-specified labels on nagios watchers.

Current state: name and status are included in the prometheus labels, no handling for other labels. ref

Proposed state: name and status are included in the prometheus labels, properties.annotations is parsed to add labels to these prometheus lines, similar to how metric watchers handle this already via properties.labels.

A superficial example:

I configure a choria server with a nagios check:

choria::scout_checks:
  EXAMPLE:
    ...
    properties:
      annotations:
        some_label: EXAMPLE
        another_label: EXAMPLE

The resulting prometheus line might look like this:

choria_machine_nagios_watcher_status{name="EXAMPLE",status="OK",some_label="EXAMPLE",another_label="EXAMPLE"} 0

(I've swapped labels out for annotations, as there is plenty of existing code, and documentation on annotations, they just are not included in the prometheus output yet.)


No worries at all if this does not make sense, or ever get done, we can always append labels in telegraf. Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions