Skip to content

Commit

Permalink
feat: resurrect repo
Browse files Browse the repository at this point in the history
  • Loading branch information
LukoJy3D committed May 1, 2024
1 parent 0ddcc47 commit ae7a64c
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 13 deletions.
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

0 comments on commit ae7a64c

Please sign in to comment.