Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upprom not loading alerting rules #2406
Comments
This comment has been minimized.
This comment has been minimized.
|
Why do you think it isn't loaded? |
This comment has been minimized.
This comment has been minimized.
linsheng9731
commented
Feb 8, 2017
|
see this -> #1866 |
This comment has been minimized.
This comment has been minimized.
|
Be aware that mounting single files in docker does not remount a file when you modify it, when you mount a single file in docker it will never update. Therefore if you do want to run Prometheus in this way, it is recommended to mount your entire directory into |
This comment has been minimized.
This comment has been minimized.
|
Hi, thanks all for the help! @brian-brazil I believe the alerting.rules file is not loaded because within Prometheus, the alert section states "No alerting rules defined" and nothing is listed under Status > Rules. Is my assumption correct? @linsheng9731 Thanks for this tip! Unfortunately, it did not work in my case, but it will be very useful to know for future reference. @brancz There are some sym link /etc/prometheus, including console_libraries -> /usr/share/prometheus/console_libraries, consoles -> /usr/share/prometheus/consoles. Are these automatically every time when prometheus starts up? Further, is it considered safe to mount a directory containing symlinks to the host fs? If not, I suppose I could mount another directory within /etc. |
This comment has been minimized.
This comment has been minimized.
|
Hi, I have tried to mount the directory containing prometheus.yml and alerting.rules files /etc/conf instead and configured prometheus appropriately, but prometheus only seems to load prometheus.yml (not the rules file). I have tried using the example rules at https://prometheus.io/docs/alerting/rules/ rather than the rule previously stated, without much effect. I have noticed logs sent to stdout seem to be info level only. Is the logging level of the official prometheus image set to info? If so, is there a way to configure level to debug without having to compile a new binary (i.e. any flags that can be set)? Any further thoughts welcome. |
This comment has been minimized.
This comment has been minimized.
|
So it turns that indentation is really, really important for yaml (note that I had incorrectly nested rule_files under global). Closing this off but thanks for your help! |
m247support
closed this
Feb 15, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
m247support commentedFeb 8, 2017
Hi,
I am playing around with Prometheus for the first time and for some reason I am not able to get Prometheus to load a test alerting.rules file. Can anyone see what I might be missing / doing wrong?
Running the official containers as follows:
Thanks in advance for any help!
Environment
$ docker -v
Docker version 1.11.2, build b9f10c9
$ uname -srm
Linux 4.4.0-62-generic x86_64
Prometheus version:
Alertmanager version:
Prometheus configuration file: