Comments (4)
I doubt this will be seen by the right audience. Maybe it's more a request for the maintainers of the snap packages?
from prometheus.
@beorn7 Sorry maybe it wasn't clear. Snap is behaving as I would expect it to behave while the docker image is the one "misbehaving" here.
from prometheus.
This isn't really anything to do with the Docker image either, overriding --entrypoint
on the Docker command line is tricky to get right, particularly as Docker supports a JSON format for multiple arguments in the Dockerfile, but not on the command line.
With:
docker run -v $PWD:/charm --entrypoint "/bin/promtool" prom/prometheus:latest 'check rules /charm/src/prometheus_alert_rules/*.rule'
The entire argument of check rules /charm/src/prometheus_alert_rules/*.rule
is being passed as one argument, with no shell parsing it. For the globs to work a shell needs to be involved.
My suggestion to make globbing work as you expect is to map in the same path on the host as the container, i.e.:
docker run -v $PWD:$PWD --entrypoint "" prom/prometheus:latest promtool check rules $PWD/*.rule
Checking /home/dgl/foo.rule
SUCCESS: 0 rules found
Then the globbing happens outside the container. This approach will continue working in the future as we may stop shipping a shell inside the container (i.e. use "distroless" containers).
from prometheus.
Looks like this is a usage question. I'll convert it to a discussion so that it stays around to help others.
from prometheus.
Related Issues (20)
- Received an OS signal, exiting gracefully..." signal=terminated HOT 1
- chore(v3): set UTF-8 default-on HOT 5
- Prometheus remote write fail, 'Failed to send batch,retrying'
- Unable to set route on prometheus container HOT 2
- fsnotify: queue or buffer overflow HOT 1
- How to get Alert of Prometheus metrics in OpenSearch Dashboard? HOT 1
- Prometheus targets show 1/0 for all targets HOT 3
- Improvement of OpenSSF Scorecard Score
- Test certificates expiring in <1y HOT 1
- Inconsistent `vector cannot contain metrics with the same labelset` errors for functions over range vectors
- Promblem with storage adpter HOT 1
- max aggregation always treats histograms as 0 HOT 2
- Scrape cache should use labels hash after relabeling HOT 1
- How to Prometheus alerts activeAt or startAt time get in Mail notification message? HOT 1
- . HOT 2
- Error opening React index.html: open web/ui/static/react/index.html: no such file or directory HOT 5
- Inconsistent Label Matchers in Remote Read Requests HOT 5
- Add global sd_configs HOT 3
- Prometheus not actually validating legacy names when utf8 on globally but overrided in scrapeconfig
- nhcb: store custom buckets in WAL, WBL HOT 2
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 prometheus.