New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mgr/dashboard: test prometheus rules through promtool #39246
Conversation
@aaSharma14 I think that in order to complete this work it is needed a script like (just an example): https://github.com/ceph/ceph/blob/master/src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh so that test you mention in the description can be run (and even create a jenkins job in case we find it necessary). |
Thanks @alfonsomthd ..will work on the script. |
74794e3
to
668ca36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great addition. It seems to work very good. Thanks for that!
If you could rename the commit message to not include "[WIP]" anymore, I'd be glad to approve.
Additionally, but also optionally, it'd be good to have consistent indentation in the test_alerts.yml
file.
668ca36
to
6ab6cb8
Compare
Thanks @p-se . I have added consistent indentation in the test_alerts.yml file and changed the commit message as well. |
jenkins test make check |
This PR intends to add unit testing for prometheus rules using promtool. To run the tests run 'run-promtool-unittests.sh' file. Fixes: https://tracker.ceph.com/issues/45415 Signed-off-by: Aashish Sharma <aasharma@redhat.com>
7f4a54c
to
53a5816
Compare
I struck the same issue as rishabh-d-dave. Why are we installing docker on systems where podman already exists? The reason I run podman is so I don't have to install/run docker and all that entails. |
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> Conflicts: debian/control install-deps.sh src/test/CMakeLists.txt
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> Conflicts: debian/control src/test/CMakeLists.txt
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> Conflicts: debian/control src/test/CMakeLists.txt
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> Conflicts: debian/control src/test/CMakeLists.txt
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> Conflicts: debian/control src/test/CMakeLists.txt
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> Conflicts: debian/control src/test/CMakeLists.txt
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> Conflicts: debian/control src/test/CMakeLists.txt
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> Conflicts: debian/control src/test/CMakeLists.txt
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit f381aa8)
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit f381aa8) Conflicts: debian/control (python-cherrypy3 conficts with python-cherrypy3 | python3-cherrypy3 in nautilus) install-deps.sh (preload_wheels_for_tox method not in nautilus so removed that) src/test/CMakeLists.txt (ceph#561-594 new changes overrid these lines, merged correctly now)
before this change, we use docker for running promtools offered by a docker image, but this is not efficient, and quite a few developers do not want to use docker for running "make check". this change was introduced by ceph#39246, the reason was that, in Ceph's CI process, we are using Ubuntu/Bionic for running "make check" jobs, but prometheus packaged by Bionic does not offer the "test rules" command. so, to address problem, we are using "dnanexus/promtool:2.9.2" docker image for verifying monitoring/prometheus/alerts/test_alerts.yml. after this change, we use prometheus packaged by debian derivatives instead of pulling a docker image. * debian/control: add prometheus as a "make check" dependency * install-deps.sh: partially revert 53a5816, as we don't need to pull docker or start docker service for using promtool anymore. * cmake: check if promtool is capable of running "test rules" command, bail out if it is not. see also: https://tracker.ceph.com/issues/49653 Signed-off-by: Kefu Chai <kchai@redhat.com> (cherry picked from commit f381aa8)
This PR intends to add unit testing for prometheus/alertmanager rules using promtool. To run the tests- With ceph_default_alerts.yml in the same directory, run 'promtool test rules test.yml'
Fixes: https://tracker.ceph.com/issues/45415
Signed-off-by: Aashish Sharma aasharma@redhat.com
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox