add yamllint config, fix yamllint errors (#2088)

After a recent change in prometheus/prometheus, Makefile.common includes
now a yamllint target which currently fails. This PR adds the missing
yamllint config and fixes the yamllint errors.

Signed-off-by: Michal Wasilewski <mwasilewski@gmx.com>
This commit is contained in:
Michal 2021-09-29 20:12:14 +02:00 committed by GitHub
parent 0e6b23c338
commit 186e2e79c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 544 additions and 527 deletions

17
.yamllint Normal file
View File

@ -0,0 +1,17 @@
---
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
commas: disable
comments: disable
comments-indentation: disable
document-start: disable
indentation:
spaces: consistent
line-length: disable

View File

@ -1,13 +1,13 @@
groups:
- name: node_exporter-16-bcache
- name: node_exporter-16-bcache
rules:
- expr: node_bcache_cache_read_races
record: node_bcache_cache_read_races_total
- name: node_exporter-16-buddyinfo
- name: node_exporter-16-buddyinfo
rules:
- expr: node_buddyinfo_blocks
record: node_buddyinfo_count
- name: node_exporter-16-stat
- name: node_exporter-16-stat
rules:
- expr: node_boot_time_seconds
record: node_boot_time
@ -19,11 +19,11 @@ groups:
record: node_forks
- expr: node_intr_total
record: node_intr
- name: node_exporter-16-cpu
- name: node_exporter-16-cpu
rules:
- expr: label_replace(node_cpu_seconds_total, "cpu", "$1", "cpu", "cpu(.+)")
record: node_cpu
- name: node_exporter-16-diskstats
- name: node_exporter-16-diskstats
rules:
- expr: node_disk_read_bytes_total
record: node_disk_bytes_read
@ -45,7 +45,7 @@ groups:
record: node_disk_writes_merged
- expr: node_disk_write_time_seconds_total * 1000
record: node_disk_write_time_ms
- name: node_exporter-16-filesystem
- name: node_exporter-16-filesystem
rules:
- expr: node_filesystem_free_bytes
record: node_filesystem_free
@ -53,17 +53,17 @@ groups:
record: node_filesystem_avail
- expr: node_filesystem_size_bytes
record: node_filesystem_size
- name: node_exporter-16-infiniband
- name: node_exporter-16-infiniband
rules:
- expr: node_infiniband_port_data_received_bytes_total
record: node_infiniband_port_data_received_bytes
- expr: node_infiniband_port_data_transmitted_bytes_total
record: node_infiniband_port_data_transmitted_bytes
- name: node_exporter-16-interrupts
- name: node_exporter-16-interrupts
rules:
- expr: node_interrupts_total
record: node_interrupts
- name: node_exporter-16-memory
- name: node_exporter-16-memory
rules:
- expr: node_memory_Active_bytes
record: node_memory_Active
@ -147,7 +147,7 @@ groups:
record: node_memory_Writeback
- expr: node_memory_WritebackTmp_bytes
record: node_memory_WritebackTmp
- name: node_exporter-16-network
- name: node_exporter-16-network
rules:
- expr: node_network_receive_bytes_total
record: node_network_receive_bytes
@ -181,7 +181,7 @@ groups:
record: node_network_transmit_multicast
- expr: node_network_transmit_packets_total
record: node_network_transmit_packets
- name: node_exporter-16-nfs
- name: node_exporter-16-nfs
rules:
- expr: node_nfs_connections_total
record: node_nfs_net_connections
@ -195,7 +195,7 @@ groups:
record: node_nfs_rpc_operations
- expr: node_nfs_rpc_retransmissions_total
record: node_nfs_rpc_retransmissions
- name: node_exporter-16-textfile
- name: node_exporter-16-textfile
rules:
- expr: node_textfile_mtime_seconds
record: node_textfile_mtime

View File

@ -1,13 +1,13 @@
groups:
- name: node_exporter-16-bcache
- name: node_exporter-16-bcache
rules:
- record: node_bcache_cache_read_races
expr: node_bcache_cache_read_races_total
- name: node_exporter-16-buddyinfo
- name: node_exporter-16-buddyinfo
rules:
- record: node_buddyinfo_blocks
expr: node_buddyinfo_count
- name: node_exporter-16-stat
- name: node_exporter-16-stat
rules:
- record: node_boot_time_seconds
expr: node_boot_time
@ -19,11 +19,11 @@ groups:
expr: node_forks
- record: node_intr_total
expr: node_intr
- name: node_exporter-16-cpu
- name: node_exporter-16-cpu
rules:
- record: node_cpu_seconds_total
expr: label_replace(node_cpu, "cpu", "$1", "cpu", "cpu(.+)")
- name: node_exporter-16-diskstats
- name: node_exporter-16-diskstats
rules:
- record: node_disk_read_bytes_total
expr: node_disk_bytes_read
@ -45,7 +45,7 @@ groups:
expr: node_disk_writes_merged
- record: node_disk_write_time_seconds_total
expr: node_disk_write_time_ms / 1000
- name: node_exporter-16-filesystem
- name: node_exporter-16-filesystem
rules:
- record: node_filesystem_free_bytes
expr: node_filesystem_free
@ -53,17 +53,17 @@ groups:
expr: node_filesystem_avail
- record: node_filesystem_size_bytes
expr: node_filesystem_size
- name: node_exporter-16-infiniband
- name: node_exporter-16-infiniband
rules:
- record: node_infiniband_port_data_received_bytes_total
expr: node_infiniband_port_data_received_bytes
- record: node_infiniband_port_data_transmitted_bytes_total
expr: node_infiniband_port_data_transmitted_bytes
- name: node_exporter-16-interrupts
- name: node_exporter-16-interrupts
rules:
- record: node_interrupts_total
expr: node_interrupts
- name: node_exporter-16-memory
- name: node_exporter-16-memory
rules:
- record: node_memory_Active_bytes
expr: node_memory_Active
@ -147,7 +147,7 @@ groups:
expr: node_memory_Writeback
- record: node_memory_WritebackTmp_bytes
expr: node_memory_WritebackTmp
- name: node_exporter-16-network
- name: node_exporter-16-network
rules:
- record: node_network_receive_bytes_total
expr: node_network_receive_bytes
@ -181,7 +181,7 @@ groups:
expr: node_network_transmit_multicast
- record: node_network_transmit_packets_total
expr: node_network_transmit_packets
- name: node_exporter-16-nfs
- name: node_exporter-16-nfs
rules:
- record: node_nfs_connections_total
expr: node_nfs_net_connections
@ -195,7 +195,7 @@ groups:
expr: node_nfs_rpc_operations
- record: node_nfs_rpc_retransmissions_total
expr: node_nfs_rpc_retransmissions
- name: node_exporter-16-textfile
- name: node_exporter-16-textfile
rules:
- record: node_textfile_mtime_seconds
expr: node_textfile_mtime

View File

@ -1,5 +1,5 @@
groups:
- name: node_exporter-17-supervisord
- name: node_exporter-17-supervisord
rules:
- record: node_supervisord_start_time_seconds
expr: node_supervisord_uptime + time()

View File

@ -1,5 +1,5 @@
groups:
- name: node_exporter-17-supervisord
- name: node_exporter-17-supervisord
rules:
- record: node_supervisord_uptime
expr: time() - node_supervisord_start_time_seconds

View File

@ -1,5 +1,5 @@
groups:
- name: example-node-exporter-rules
- name: example-node-exporter-rules
rules:
# The count of CPUs per node, useful for getting CPU time as a percent of total.
- record: instance:node_cpus:count