Skip to content

Make exclude filters in graphite path work #340

@Tqnsls

Description

@Tqnsls

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.

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