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

View file

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

View file

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

View file

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

View file

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