Mackerel blog #mackerelio

The Official Blog of Mackerel

【Advanced release notice】Specification changes for the host update API

Thank you for choosing Mackerel.

With the release scheduled for January 30, 2019 (Wednesday), changes will be made to the specifications of the host update API in order to make posting check reports with the API even more convenient.

The contents of these changes follow below.

Before the changes

With the host update API, in addition to the host's own information, you can send a list of check monitors that monitor the host and that list is synchronized with the check monitors in Mackerel.

Under the current specifications, if reports of check monitors not included in this list are posted to the host, the reports will be deleted and any open alerts will be closed automatically when the host information is updated.

The agent periodically updates the host’s information internally using the host update API and sends it together with a list of the check monitors described in the agent configuration file. With this mechanism, the configuration file and the check monitors in Mackerel are synchronized, and the check monitors that are deleted when the configuration file is updated are also deleted in Mackerel.

After the changes

The specification that synchronizes the host update API and the list of check monitors will change in the following ways:

When there are reports of check monitors that are not included in the list that was previously posted to the host...

  • If an alert related to that check monitor is opened, then the check monitor result will not be deleted in Mackerel and the alert will remain open.
  • If an alert related to that check monitor has not occurred, as with the current specifications, the check monitor results will be deleted in Mackerel.

Intention of the specification changes

As previously mentioned above, the agent internally uses the host update API to periodically synchronize the check monitors described in the agent configuration file with Mackerel. For this reason, according to the current specifications, if using the check report posting API from outside the agent to post reports to the host, and if check monitors are not included in the agent configuration file, deletions periodically happen regardless of whether or not an alert has occurred. And because of this, the display of check reports in Mackerel and use of the alert function can not be used normally.

With the specification change, even if check reports are posted from outside the agent, even if check monitors are not included in the agent configuration file, reports will no longer be deleted in Mackerel when an alert has occurred and the alert function can be used normally.

As a reminder, if there are no open alerts, the check reports will be deleted in Mackerel, same as with the current specifications. For this reason, there may be a difference in the display of check reports in the host detail screen, depending on the timing of the host information update and when check reports are posted from outside the agent. Please take this into consideration before using the API.

Thank you for your cooperation.