0

I currently have collectd 5.4 installed on my linux host and attempting to use percent to trigger a notification when the threshold has been exceeded but it doesn't appear to work. The threshold for CPU does work however. My current config:

  LoadPlugin threshold
     <Plugin threshold>
         <Plugin "cpu">
           <Type "cpu">
           Instance "idle"
           DataSource "value"
           WarningMin 10
           FailureMin 5
           Hits 25
           Persist true
           </Type>
      </Plugin>
      <Plugin "df">
        Instance "usr"
          <Type "df">
          Instance "free"
          WarningMin 50
          FailureMin 55
          Percentage true
          Persist true
          </Type>
       </Plugin>

Anyone ever gotten this to work?

FiReTiTi
  • 5,597
  • 12
  • 30
  • 58

1 Answers1

0

Percentage inside threshold blocks only works for values with multiple datasources, which is not the case for the df plugin for collectd 5.x. Fortunately since 5.4 there is the ValuesPercentage option for the df plugin which will let you achieve your goal using the percent_bytes type.

Here's a full example config that will poll filesystem usage and emit notifications to syslog when there is no free space on any filesystem:

<Plugin syslog>
  LogLevel notice
  NotifyLevel OKAY
</Plugin>

LoadPlugin df
<Plugin df>
  ValuesPercentage true
</Plugin>

LoadPlugin "threshold"
<Plugin "threshold">
 <Plugin df>
  <Type "percent_bytes">
    Instance free
    WarningMin 10
    FailureMin 1
  </Type>
 </Plugin>
</Plugin>
faxmodem
  • 430
  • 3
  • 12
  • Could you provide an example, using my example on how to configure this? I've tried many variations but none or working. – user2581889 Sep 08 '14 at 20:33