Icinga / Icinga/icingaweb2-module-graphite

Make exclude filters in graphite path work

Open
#340 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
73
Forks
31
PR merge metrics
No merged PRs in 30d

Description

It seems it is currently not possible to exclude specific paths however it is possible to include only some specific path .

Status Quo

In the example I have these graphite paths for the disk command check for my /home mountpoint.

icinga2.myhostname.services.myservicename.disk.perfdata._home.value
icinga2.myhostname.services.myservicename.disk.perfdata._home_inode_free.value
icinga2.myhostname.services.myservicename.disk.perfdata._home_inode_percent.value
icinga2.myhostname.services.myservicename.disk.perfdata._home_inode_used.value

The problem is there are different mountpoints that I can not create each a template for all the mountpoints..

What I want to include only

icinga2.myhostname.services.myservicename.disk.perfdata._home.value

So I want to exclude

icinga2.myhostname.services.myservicename.disk.perfdata._home_inode_free.value
icinga2.myhostname.services.myservicename.disk.perfdata._home_inode_percent.value
icinga2.myhostname.services.myservicename.disk.perfdata._home_inode_used.value

My Goal is ..

to let the graphs look somewhat like this
Image

However, it just looks like this (look specifically at the last four graphs):

Image

I also checked the icinga-web-graphite-integration docs and tried with the braces but could not get it to work.

In grafana for example it can be done by using the function exclude:
Image

The metrics_filters I tested with

This filter obviously only includes the "icinga2.myhostname.services.myservicename.disk.perfdata._home_inode_used.value"

[disk_with_inodes_inode_usage.metrics_filters]
inode_used_value = "$service_name_template$.perfdata.$disk$_inode_used.value"

And this should exclude all inode paths and therefore only include "icinga2.myhostname.services.myservicename.disk.perfdata._home_inode_free.value"

[disk_with_inodes.metrics_filters]
value = "$service_name_template$.perfdata.$disk:{?!*inode.*}$.value"

This feature request is also related to my community post.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked metric_filters documentation and the two example filters in this issue, then compare them with the current template-filtering behavior. Verify how braces and exclusions are parsed, and use the disk metric examples as the acceptance cases: inode paths should be excluded while the mountpoint value remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.