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

feat: resurrect repo #3

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,3 @@ jobs:
metric: 'prometheus_remote_storage_exemplars_in_total'
label: 'instance'
values: 'demo.do.prometheus.io:9100,demo.do.prometheus.io:9090'

- name: send message
uses: appleboy/discord-action@v1.0.0
with:
webhook_id: ${{ secrets.WEBHOOK_ID }}
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
message: "Metrics are not available for: \n```${{steps.metricsure.outputs.invalid_values}}```"
21 changes: 21 additions & 0 deletions .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: lint-pr

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
validate:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)
[![Test metricsure](https://github.com/LukoJy3D/metricsure/actions/workflows/ci.yml/badge.svg)](https://github.com/LukoJy3D/metricsure/actions/workflows/ci.yml)
[![Star on GitHub](https://img.shields.io/github/stars/LukoJy3D/metricsure.svg?style=social)](https://github.com/LukoJy3D/metricsure/stargazers)


# metricsure

Simple github action to validate metric existence with specific labels and values against prometheus like endpoint.

## Inputs

`endpoint` - Prometheus like endpoint to query metrics from.
`metric` - Metric name to query. (Currently only supports single metric)
`label` - Label name to query. (Currently only supports single label)
`values` - Label values to query.
- `endpoint` - Prometheus like endpoint to query metrics from.
- `metric` - Metric name to query. (Currently only supports single metric)
- `label` - Label name to query. (Currently only supports single label)
- `values` - Label values to query.

## Outputs

`invalid_values` - List of values that did not return any metrics from the endpoint.
`invalid_values` - List of values that did not return any metrics from the endpoint.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
requests==2.26.0
requests==2.31.0