Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - thresholds #292

Closed
2knarf opened this issue Jul 15, 2015 · 7 comments · Fixed by #829
Closed

Feature request - thresholds #292

2knarf opened this issue Jul 15, 2015 · 7 comments · Fixed by #829
Labels
enhancement New feature or request

Comments

@2knarf
Copy link

2knarf commented Jul 15, 2015

It would be very nice to implement thresholds support

https://collectd.org/wiki/index.php/Notifications_and_thresholds

@jyaworski
Copy link
Member

Do you have an idea as to how this might be used in an environment?

@juniorsysadmin juniorsysadmin added the enhancement New feature or request label Dec 20, 2016
@jamtur01
Copy link
Contributor

jamtur01 commented Dec 20, 2016

Yep. You might use thresholds with the processes plugin to define a threshold of processes. For example, if there are sixteen Nginx processes then emit okay, if less than sixteen emit a warning, if less than 12 emit a critical notification. It's basically very simple threshold alerting a la a monitoring system but in the form of a collectd notification metric. Super useful.

Here's an example for monitoring Graphite:

<Plugin "processes">
  ProcessMatch "carbon-cache" "python.+carbon-cache"
</Plugin>

<Plugin "threshold">
   <Plugin "processes">
     Instance "carbon-cache"
       <Type "ps_count">
         DataSource "processes"
         WarningMin 2
         FailureMin 1
       </Type>
   </Plugin>
</Plugin>

smortex added a commit to smortex/puppet-collectd that referenced this issue Jul 11, 2018
```puppet
class { 'collectd::plugin::processes':
  process_matches => [
    'carbon-cache',
    'python.+carbon-cache',
  ],
}

class { 'collectd::plugin::threshold':
  plugins => {
    processes => {
      instance => 'carbon-cache',
      types    => {
        data_source => 'processes',
	warning_min => 16,
	failure_min => 12,
      },
    },
  },
}
```

Fixes voxpupuli#292 (Above example from this issue).
@smortex
Copy link
Member

smortex commented Jul 11, 2018

@jamtur01 looks like your example does not match the description ;-)

Have a look at #829 if you are still interested in this 😉

@jamtur01
Copy link
Contributor

@smortex I don't understand your comment?

@smortex
Copy link
Member

smortex commented Jul 11, 2018

Oh, sorry to be unclear…

For example, if there are sixteen Nginx processes then emit okay, if less than sixteen emit a warning, if less than 12 emit a critical notification

and in the code:

         WarningMin 2
         FailureMin 1

I guess you meant:

         WarningMin 16
         FailureMin 12

@jamtur01
Copy link
Contributor

jamtur01 commented Jul 11, 2018

@smortex No I didn't. I used that example and then said: "Here's an example for monitoring Graphite:" Those are two separate examples.

smortex added a commit to smortex/puppet-collectd that referenced this issue Jul 11, 2018
```puppet
class { 'collectd::plugin::processes':
  process_matches => [
    'carbon-cache',
    'python.+carbon-cache',
  ],
}

class { 'collectd::plugin::threshold':
  plugins => {
    processes => {
      instance => 'carbon-cache',
      types    => {
        data_source => 'processes',
	warning_min => 16,
	failure_min => 12,
      },
    },
  },
}
```

Fixes voxpupuli#292 (Above example from this issue).
@smortex
Copy link
Member

smortex commented Jul 11, 2018

Ah! I don't use nginx nor graphite, and am new to the threshold thing in collectd. I did not understood it was 2 different things and wanted to be sure that the mismatch was a typo and not something "magic". So it's neither something magic or a typo… and everything is fine, thanks! Sorry for the noise 😃

smortex added a commit to smortex/puppet-collectd that referenced this issue Jul 11, 2018
```puppet
class { 'collectd::plugin::processes':
  process_matches => [
    'carbon-cache',
    'python.+carbon-cache',
  ],
}

class { 'collectd::plugin::threshold':
  plugins => {
    processes => {
      instance => 'carbon-cache',
      types    => {
        data_source => 'processes',
        warning_min => 2,
        failure_min => 1,
      },
    },
  },
}
```

Fixes voxpupuli#292 (Above example from this issue).
smortex added a commit to smortex/puppet-collectd that referenced this issue Jul 11, 2018
```puppet
class { 'collectd::plugin::processes':
  process_matches => [
    'carbon-cache',
    'python.+carbon-cache',
  ],
}

class { 'collectd::plugin::threshold':
  plugins => {
    processes => {
      instance => 'carbon-cache',
      types    => {
        data_source => 'processes',
        warning_min => 2,
        failure_min => 1,
      },
    },
  },
}
```

Fixes voxpupuli#292 (Above example from this issue).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants