Mackerel blog #mackerelio

The Official Blog of Mackerel

Notification content to PagerDuty improved・Updates for the agent and more

Happy New Year everybody! Mackerel team CRE Inoue (id:a-know) here.

Today’s release is the first of 2018. This year we are excited to bring all of our users lots of advanced and useful features.

Now on to this week’s update information.

Notification content to PagerDuty improved

The following items have been added to the json content that is included in the notification request for PagerDuty notifications, one of Mackerel’s notification channels.

  • In the event of an alert notification to the host, newly included items are:
    • Host ID, Host name, a list of roles to which the host belongs
  • In the event of an alert notification to the service, newly included items are:
    • Service name

Available with either PagerDuty API V1 or V2, this update makes notification content even more programmable. By all means, try it out.

mackerel.io

mackerel-agent now supports plugin timeout setting

There are plugins with various possible configurations for mackerel-agent. Although convenient, up until now these plugins all had a uniform specification of 30 seconds to timeout.

With this update, it is now possible to set an arbitrary number of seconds for each plugin. For example, if you want to set the timeout to 45 seconds, write the following.

[plugin.metrics.get-metrics]
command = "ruby /path/to/get-metrics.rb"
timeout_seconds = 45

This can also be specified for check plugins.

[plugin.checks.check-state]
command = "ruby /path/to/check-state.rb"
timeout_seconds = 45

By default, the plugin execution interval is set at one minute. Control to prevent plugins from running at the same time is not included in the specifications of mackerel-agent. Therefore, we recommend that you set a time for timeout_seconds that does not exceed the plugin execution interval. (otherwise processing for the following plugin will start before the previous is completed)

Updates for Mackerel related OSS

Updates for various Mackerel related OSS were made this week and the details follow below. We received a ton of Pull Requests over the New Year’s holidays and we would like the thank everyone who contributed!

mackerel-agent v0.49.0

  • mackerel-agent now supports plugin timeout setting (as described above)
  • retry processing for check monitoring notifications was improved
  • The problem of obtaining too much information and metrics with the Docker host was addressed
    • network interfaces beginning with veth are now excluded
    • devices beginning with dm- (devicemapper) are now excluded
    • file systems beginning with dm- (devicemapper) are now excluded
  • A startup problem that occurred if /var/lib/mackerel-agent/id was empty has been corrected
  • [Windows version] check-uptime.exe is now bundled in the package

mackerel-agent-plugins v0.42.0

  • [mongodb] A problem with some metrics not being obtained correctly with mongodb where replica-set is built was fixed
  • [haproxy] Unix Domain Socket can now be specified with the -socket option
  • [postgres] Can now run with the older version (9.3.14) Postgresql

go-check-plugins v0.15.0

  • [mysql] readonly subcommand was added to check if the target mysql server is readonly

plugin-registry

  • mackerel-plugin-aws-ecs was added
    • This can be used like mkr plugin install mackerel-plugin-aws-ecs by using the plugin installer feature.
    • Some users have already tried out and wrote about it. Check out the following article! (Japanese only)

kakakakakku.hatenablog.com