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

Support query monitorings #664

Merged
merged 5 commits into from
Nov 26, 2024
Merged

Support query monitorings #664

merged 5 commits into from
Nov 26, 2024

Conversation

rmatsuoka
Copy link
Member

@rmatsuoka rmatsuoka commented Nov 22, 2024

I make mkr support "query monitoring", which is a new monitoring rule on Mackerel.

example

First I have got monitors.json using mkr monitors pull and edited it to add a new query rule new query.
Then, I tested two command diff and push as following.

% ./mkr monitors diff
Summary: 0 modify, 1 append, 0 remove

+{
+  "name": "new query",
+  "type": "query",
+  "query": "http.client.duration.p90{service.name=\"web-app\"}",
+  "operator": "<",
+  "warning": 1,
+  "critical": null,
+  "legend": "{{http.status_code}}"
+},
% ./mkr monitors push
      info Create a new rule.
{
  "name": "new query",
  "type": "query",
  "query": "http.client.duration.p90{service.name=\"web-app\"}",
  "operator": "<",
  "warning": 1,
  "critical": null,
  "legend": "{{http.status_code}}"
},

After that, I checked the new rule was created through https://mackerel.io/my/monitors

@rmatsuoka rmatsuoka changed the title Query monitor Support query monitorings Nov 22, 2024
@rmatsuoka rmatsuoka marked this pull request as ready for review November 22, 2024 11:46
Copy link
Contributor

@yseto yseto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good.

@rmatsuoka rmatsuoka merged commit dab5bc0 into master Nov 26, 2024
13 checks passed
@rmatsuoka rmatsuoka deleted the query-monitor branch November 26, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants