Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thierno953/docker-monitoring
https://github.com/thierno953/docker-monitoring
alertmanager cadvisor-exporter grafana node-exporter prometheus
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thierno953/docker-monitoring
- Owner: thierno953
- Created: 2023-06-20T21:28:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-29T14:01:24.000Z (10 months ago)
- Last Synced: 2024-01-29T16:57:44.741Z (10 months ago)
- Topics: alertmanager, cadvisor-exporter, grafana, node-exporter, prometheus
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Monitoring
**Connect to container and execute below Influx Commands**
```
docker exec -it influxdb2 bash
influx
CREATE DATABASE "jenkins" WITH DURATION 1825d REPLICATION 1 NAME "jenkins-retention"
SHOW DATABASES
USE
```## Dropdown
```
SHOW TAG VALUES FROM job WITH KEY = "owner"
SHOW TAG VALUES FROM job WITH KEY = repo WHERE "owner" =~ /^($folder)$/
```## Overall Panel
query to get success build count
```
SELECT count(build_number) FROM "jenkins_data" WHERE ("project_name" =~ /^(?i)$job$/ AND "project_path" =~ /.*(?i)$folder.*$/) AND ("build_result" = 'SUCCESS' OR "build_result" = 'CompletedSuccess' ) AND $timeFilter
```query to get failed build count
```
SELECT count(build_number) FROM "jenkins_data" WHERE ("project_name" =~ /^(?i)$job$/ AND "project_path" =~ /.*(?i)$folder.*$/) AND ("build_result" = 'FAILURE' OR "build_result" = 'CompletedError' ) AND $timeFilter
```query to get aborted build count
```
SELECT count(build_number) FROM "jenkins_data" WHERE ("project_name" =~ /^(?i)$job$/ AND "project_path" =~ /.*(?i)$folder.*$/) AND ("build_result" = 'ABORTED' OR "build_result" = 'Aborted' ) AND $timeFilter
```query to get unstable build count
```
SELECT count(build_number) FROM "jenkins_data" WHERE ("project_name" =~ /^(?i)$job$/ AND "project_path" =~ /.*(?i)$folder.*$/) AND ("build_result" = 'UNSTABLE' OR "build_result" = 'Unstable' ) AND $timeFilter
```## Number of pipelines ran
```
select count(DISTINCT project_name) FROM jenkins_data WHERE ("project_name" =~ /^(?i)$job$/ AND "project_path" =~ /.*(?i)$folder.*$/) AND $timeFilter
```## Total number of builds
```
SELECT count(build_number) FROM "jenkins_data" WHERE ("project_name" =~ /^(?i)$job$/ AND "project_path" =~ /.*(?i)$folder.*$/) AND $timeFilter
```## Avg Build time
```
select build_time/1000 FROM jenkins_data WHERE ("project_name" =~ /^(?i)$job$/ AND "project_path" =~ /.*(?i)$folder.*$/) AND $timeFilter
```## Latest Build Status
```
SELECT build_result FROM "jenkins_data" WHERE ("project_name" =~ /^(?i)$job$/ AND "project_path" =~ /.*(?i)$folder.*$/) AND $timeFilter ORDER BY time DESC LIMIT 1
```## build details
```
SELECT "build_exec_time","project_path","build_number","build_causer","build_time","build_result" FROM "jenkins_data" WHERE ("project_name" =~ /^(?i)$job$/ AND "project_path" =~ /.*(?i)$folder.*$/) AND $timeFilter
```` http://192.168.129.2:8080/job/${__data.fields["jenkins_data.project_path"]}/${__data.fields["jenkins_data.build_number"]}`
regex `/(\/)/g --> /job$1`