Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Alertmanager | 5,565 | 66 | 240 | 17 hours ago | 149 | April 05, 2022 | 429 | apache-2.0 | Go | |
Prometheus Alertmanager | ||||||||||
Dockprom | 5,284 | 23 days ago | 5 | mit | ||||||
Docker hosts and containers monitoring with Prometheus, Grafana, cAdvisor, NodeExporter and AlertManager | ||||||||||
Kube Prometheus | 5,115 | 2 days ago | 27 | June 17, 2022 | 175 | apache-2.0 | Jsonnet | |||
Use Prometheus to monitor Kubernetes and applications running on Kubernetes | ||||||||||
Awesome Prometheus Alerts | 4,754 | 2 days ago | 18 | other | HTML | |||||
🚨 Collection of Prometheus alerting rules | ||||||||||
Self Hosting Guide | 4,331 | 16 hours ago | 5 | Dockerfile | ||||||
Self-Hosting Guide. Learn all about locally hosting (on premises & private web servers) and managing software applications by yourself or your organization. Including WireGuard, Home Assistant, Homebridge, Jellyfin, Wi-Fi 6 (2.4 GHz and 5 GHz), and Wi-Fi 6E (6 GHz). | ||||||||||
Prometheus | 3,839 | 2 months ago | mit | |||||||
A docker-compose stack for Prometheus monitoring | ||||||||||
Hertzbeat | 2,654 | 10 hours ago | 74 | apache-2.0 | Java | |||||
An open source, real-time monitoring tool with custom-monitor and agentless. Web, database, os, middleware, cloudnative, network and more. Aim to monitor everything! | ||||||||||
Goldpinger | 2,191 | 5 months ago | 11 | August 29, 2022 | 19 | apache-2.0 | JavaScript | |||
Debugging tool for Kubernetes which tests and displays connectivity between nodes in the cluster. | ||||||||||
Prometheusalert | 2,067 | 17 days ago | 10 | April 19, 2021 | 27 | mit | JavaScript | |||
Prometheus Alert是开源的运维告警中心消息转发系统,支持主流的监控系统Prometheus,Zabbix,日志系统Graylog和数据可视化系统Grafana发出的预警消息,支持钉钉,微信,华为云短信,腾讯云短信,腾讯云电话,阿里云短信,阿里云电话等 | ||||||||||
Karma | 1,922 | 3 days ago | 2 | August 12, 2021 | 3 | apache-2.0 | TypeScript | |||
Alert dashboard for Prometheus Alertmanager |
Join the "Security Through Observability" Google Group to get updates about this project.
For code/config snippets used in my demo, see this repo: geekdave/monitorama
A Prometheus integration with the InSpec "Compliance as Code" tool.
Converts InSpec json reports into Prometheus metrics, so you can monitor your compliance checks using Prometheus and fire alerts if anything falls out of compliance.
/usr/local/etc/inspec-results
/metrics
endpoint*.json
files# HELP inspec_checks_total Number of inspec checks
# TYPE inspec_checks_total gauge
inspec_checks_total{profile="ssl-baseline",status="passed"} 6
inspec_checks_total{profile="ssl-baseline",status="failed"} 0
inspec_checks_total{profile="ssl-baseline",status="skipped"} 0
This project is currently in the early stages and may be rough around the edges. It may contain bugs. Please try it out and let us know how we can improve it! PRs are welcome!
See: https://www.inspec.io/downloads/
Run sudo crontab -e
to set up a recurring job like this:
0 * * * * /usr/local/bin/run_inspec.sh
Probably hourly is a good place to start, but your needs may vary. Some InSpec suites may take a couple minutes to run, so it's not recommended to run it more frequently than the duration of the suites. Otherwise you might run into errors with overlapping checks overwriting each other.
Create a run_inspec.sh
script like this:
#!/usr/bin/env bash
# Run InSpec results and output to temp file
inspec exec https://github.com/geekdave/monitorama --reporter json | jq '.' > /tmp/monitorama.json
# Atomically move the temp file to the expected location to avoid reading partially-written results
mv /tmp/monitorama.json /usr/local/etc/inspec-results/monitorama.json
sudo docker run \
-d \
--rm \
--name prometheus_inspec_exporter \
-v /usr/local/etc/inspec-results:/usr/local/etc/inspec-results \
-v /usr/local/etc/inspec-reports:/usr/local/etc/inspec-reports \
-p 9207:9207 \
geekdave/prometheus_inspec_exporter
/usr/local/etc/inspec-results:/usr/local/etc/inspec-results
to reflect /path/to/your/inspec-results:/usr/local/etc/inspec-results
from your InSpec runner script (above)/usr/local/etc/inspec-reports:/usr/local/etc/inspec-reports
to reflect /path/to/your/inspec-reports:/usr/local/etc/inspec-reports
- Any directory you want this exporter to save your HTML reports into.-p 9207:9207
to reflect -p $PORT_YOU_WANT_TO_EXPOSE:9207
Sample Prometheus config snippet
- job_name: 'inspec'
scrape_interval: 1m
scrape_timeout: 1m
static_configs:
- targets:
- 'myhost1.example.com:9207'
- 'myhost2.example.com:9207'
- 'myhost3.example.com:9207'
See the Prometheus docs for setting up automatic service discovery instead of maintaining a list of static hosts.
You can then write Prometheus alerts like this:
- alert: ComplianceFailure
expr: inspec_checks_total{status="failed"} > 0
labels:
severity: slack
annotations:
identifier: "{{ $labels.profile }} : {{ $labels.instance }}"
description: "{{ $labels.instance }} has {{ $value }} compliance failures on the {{ $labels.profile }} profile.
This exporter saves HTML versions of the full InSpec reports to /usr/local/etc/inspec-reports
using a custom markdown/HTML format that preserves much more metadata than the out-of-the-box InSpec reports.
HTML reports will be saved to /usr/local/etc/inspec-reports
(map it using docker path mapping as defined above).
You can write a script to periodically upload these files to S3 to make them available as click-throughs from your Prometheus alerts as shown below.
TODO: Create automatic support for uploading to S3.
- alert: ComplianceFailure
expr: inspec_checks_total{status="failed"} > 0
labels:
severity: slack
annotations:
identifier: "{{ $labels.profile }} : {{ $labels.instance }}"
description: "{{ $labels.instance }} has {{ $value }} compliance failures on the {{ $labels.profile }} profile. Report and remediation steps: http://glueops-inspec-bucket-results.s3-website-us-east-1.amazonaws.com/{{ $labels.profile }}/{{ $labels.instance }}"
To make sure that your cron job is running as expected, and correctly refreshing the reports, this exporter also exposes a metric for the last modified time of the json file:
# HELP inspec_checks_mtime Last modified time of inspec checks
# TYPE inspec_checks_mtime gauge
inspec_checks_mtime{profile="ssl-baseline"} 1528206609632.9578
You can consume it like this:
time() - inspec_checks_mtime{instance=~"$instance"} / 1000
This will compare the current time with the last modified time, and you could write an alert like:
alert: StaleInSpecResults
expr: time() - inspec_checks_mtime{instance=~"$instance"} / 1000 > 7200
labels:
severity: slack
annotations:
description: '{{ $labels.instance }} has stale InSpec metrics.'
summary: Instance {{ $labels.instance }} expected to have InSpec results refreshed every hour, but it has been over 2 hours. Please check that the cron job is running as expected.
docker build . -t org/containername:tag
i.e.
docker build . -t geekdave/prometheus_inspec_exporter:latest