Docker install: metrics not shown in web app
Hello, I have made a docker-compose project based on image "crowdsecurity/crowdsec:latest-debian". The ban works fine, I have enrolled the instance and I got metrics within the webapp.
Then 2 days latter I had the message "No alert receveid within the last 24h" on the webapp, I may have restarted the container in those two days.
Below is the docker-compose. I used the example provided on Github for journald: https://github.com/crowdsecurity/example-docker-compose/blob/main/journald/docker-compose.yml
On this example there is no persistent volume 'crowdsec-config', could this explain why if the container get restarted the instance does not send metrics anymore ? How can i set a specific acquis.yaml and a persistent volume in the same time ?
sizeur@localhost:/media/crowdsec $ cat docker-compose.yml
services:
crowdsec:
image: crowdsecurity/crowdsec:latest-debian
restart: always
environment:
# DISABLE_PARSERS: "crowdsecurity/whitelists"
COLLECTIONS: "crowdsecurity/linux crowdsecurity/iptables crowdsecurity/sshd"
TZ: "Europe/Paris"
volumes:
- ./crowdsec/acquis.yaml:/etc/crowdsec/acquis.yaml
- /var/log/journal:/var/log/host:ro
- crowdsec-db:/var/lib/crowdsec/data/
ports:
- "8080:8080"
networks:
crowdsec:
volumes:
crowdsec-db:
networks:
crowdsec:
driver: bridge
sizeur@localhost:/media/crowdsec $ cat crowdsec/acquis.yaml
source: journalctl
journalctl_filter:
- "--directory=/var/log/host/"
labels:
type: syslog
GitHub
example-docker-compose/journald/docker-compose.yml at main · crowd...
Example integration of crowdsec in docker-compose. Contribute to crowdsecurity/example-docker-compose development by creating an account on GitHub.
2 Replies
Important Information
This post has been marked as resolved. If this is a mistake please press the red button below or type
/unresolve© Created By WhyAydan for CrowdSec ❤️
Resolving Docker install: metrics not shown in web app
This has now been resolved. If you think this is a mistake please run
/unresolve