Commands can now be invoked based on check monitoring results etc.

Last week, we made an announcement regarding the termination of the “im.kayac” service (Termination schedule for the notification channel "im.kayac" - Mackerel blog #mackerelio). And as scheduled, the feature became unavailable as a notification destination in Mackerel on October 26th.

The following operations are no longer available.

  • Creating a new im.kayac channel in the “Channel Settings”
  • Display of existing registered im.kayac channels is channel list
  • Sending of notifications to existing registered im.kayac channels

For those of you who used im.kayac as a notification destination, please review the notification settings once again.

Anyways, here is this week’s update information.

Arbitrary commands can now be invoked based on check monitoring results

Check monitoring in Mackerel allows the user to monitor from various points of view, such monitoring text logs with check-log and monitoring processes with check-procs. With this week's update, it is now possible to execute commands based on those monitoring results.

In order to use this feature, you’ll need to add the action option to mackerel-agent.conf as shown below.

command = "check-log -f /path/to/file -p PATTERN"
action = { command = "bash -c '[ \"$MACKEREL_STATUS\" != \"OK\" ]' && ruby /path/to/something.rb", user = "someone" }

In the environment variable MACKEREL_STATUS, the execution result (either OK, WARNING, CRITICAL, or UNKNOWN) of the immediately preceding command (not action.command) is set. In the above example, if the execution result of the previous check monitor is not OK, the command is invoked as the user specified in the user (configuration) field.

There’s also an environment variable called MACKEREL_PREVIOUS_STATUS which sets the “execution result of the command before the previous command”, and this will allow you to flexibly automate operation, to some extent, based on check monitoring results. Check out the help page below for more details about this feature.

Tags can now be filtered in AWS Integration - SQS

In order for sqs: ListQueueTags actions can be performed, policies need to be granted. For details, refer to the "Filter by tag" section in the following help page.

Expressions no longer included in sentences of expression monitoring alert notifications

This is an Experimental Feature for Expression Monitoring in Mackerel, and with a monitor rule which uses this, long expressions will no longer be included in the contents of alert notifications.

The text of mail will be displayed as always.

Other releases

  • Support for Amazon Linux version 2017.09
  • Command line tool mkr updated, support added for new metrics command
    • For details, refer to the help page Using the mkr CLI tool - Mackerel help
  • mackerel-check-plugins updated
    • check-disk plugin corrections

Thank you to everyone who contributed Pull Requests!!

Various events

Mackerel team CRE id:Soudai will be presenting at Geeks Who Drink in Fukuoka - Monitoring Workshop Edition- held at the Fukuoka branch of Nulab Inc. this coming Monday, October 30th! (Japanese only)

The day after that, Mackerel will be running a booth at the AWS CloudRoadShow Fukuoka held on Tuesday, October 31st!

AWS Cloud Roadshow 2017 福岡 powered by Intel® 広島、大阪、名古屋、福岡の 4 都市を巡る無料クラウドカンファレンス開催! | アマゾン ウェブ サービス (Japanese only)

To all of the engineers in the Fukuoka area, don’t miss out!