Comments (7)
Many thanks for the report. Can you check that the promtool check command works without errors on the new alert file?
I want to verify whether it is the promtool command or the alert file which causes the error.
from puppet-prometheus.
Hi @tuxmea ,
After getting above described error, I did ssh to vagrant box and added some simple alert.rules file to check promtool command . below copy of terminal .
[root@prometheus ~]# prometheus --version
prometheus, version 2.0.0 (branch: HEAD, revision: 0a74f98628a0463dddc90528220c94de5032d1a0)
build user: root@615b82cb36b6
build date: 20171108-07:11:59
go version: go1.9.2
[root@prometheus ~]# cat /etc/prometheus/alert.rules
groups:
- name: example
rules:
- alert: HighErrorRate
expr: job:request_latency_seconds:mean5m{job="myjob"} > 0.5
for: 10m
labels:
severity: page
annotations:
summary: High request latency
[root@prometheus ~]# /usr/local/bin/promtool check rules /etc/prometheus/alert.rules
Checking /etc/prometheus/alert.rules
SUCCESS: 1 rules found
[root@prometheus ~]# echo $?
0
[root@prometheus ~]#
BR
Karen
from puppet-prometheus.
definitely something wrong with alert.rules files . including '::prometheus' should work out of box . I`m wondering that something is wrong here
from puppet-prometheus.
content => $alerts.to_yaml,
I think here converting is not working or we are providing wrong hash . but by default alert.rules is empty . if it`s empty?, validation should giving error .
from puppet-prometheus.
Found issue . As Far as alert.rule has no default value Validation of empty yaml file is giving above error . so either we should add some default alert.rules to module to get include ::prometheus
working out of box , or we should add in Readme that without alertrules your going to get error . I`ll do in minutes pull to Readme file to add Hash to alert.rule >= prometheus2.0.0
from puppet-prometheus.
Empty hashes seem to work, while empty arrays don't:
$ ruby -e "require 'yaml'; puts {}.to_yaml" | promtool check rules /dev/stdin
Checking /dev/stdin
SUCCESS: 0 rules found
$ ruby -e "require 'yaml'; puts [].to_yaml" | promtool check rules /dev/stdin
Checking /dev/stdin
FAILED:
yaml: unmarshal errors:
line 1: cannot unmarshal !!seq into rulefmt.RuleGroups
So we can just change the default to {}
. People using 1.* and not providing alert rules would still get a noop, while those providing rules would see no change, since they would override the default.
from puppet-prometheus.
Hi @costela ,
Thats a good one , it will solve include ::prometheus without any param , otherwise we should define some alert rules , From me +
Greetings
from puppet-prometheus.
Related Issues (20)
- node_exporter.pp does not provide direct way to override the listening port
- ipmi exporter does not support remote ipmi HOT 1
- Add support for managing kafka node exporter
- deprecation of `source_match(_re)` and `target_match(_re)`
- mongodb_exporter doesn't allow overriding service and binary name
- Trouble using prometheus::server::collect_tag. HOT 1
- node_exporter change default port 9100 HOT 2
- Support scrape_config_files option HOT 3
- Received SIGTERM, exiting gracefully HOT 3
- Remove prometheus 1.x support
- Remove support for alertmanager < 0.13.0
- Drop support for redis_exporter < 1.0.0
- "job_name: prometheus" duplication HOT 1
- replace systemd unit templates with systemd::manage_unit
- Dependency Dashboard
- Dependency Dashboard
- Drop suppoprt for apache_exporter < 1.x HOT 1
- move all exporter versions to the manifests.
- Drop support for elasticsearch_exporter < 1.1.0
- Archlinux prometheus server ui bug with version > 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-prometheus.