What’s the difference between Prometheus and Zabbix? [closed]

Both Zabbix and Prometheus may be used in various monitoring scenarios, and there isn’t any particular specialization in either of these. Zabbix is older than Prometheus and probably more stable, with more ready-to-use solutions. Zabbix has a core written in C and a web UI based on PHP. Also it uses “agents” (client-side programs) written … Read more

Different Prometheus scrape URL for every target

You currently can’t configure the metrics_path per target within a job but you can create separate jobs for each of your targets so you can define metrics_path per target. Your config file would look something like this: scrape_configs: – job_name: ‘example-target-1’ scrape_interval: 5s metrics_path: /target-1-path-to-metrics static_configs: – targets: [‘localhost:8090’] labels: group: ‘dummy’ – job_name: ‘example-target-2’ … Read more

Increasing Prometheus storage retention

Edit the prometheus.service file vi /etc/systemd/system/prometheus.service add “–storage.tsdb.retention.time=1y” below to “ExecStart=/usr/local/bin/prometheus \” line. So the config will look like bellow for 1 year of data retention. [Unit] Description=Prometheus Wants=network-online.target After=network-online.target [Service] User=prometheus Group=prometheus Type=simple ExecStart=/usr/local/bin/prometheus \ –config.file /etc/prometheus/prometheus.yml \ –storage.tsdb.path /var/lib/prometheus/ \ –web.console.templates=/etc/prometheus/consoles \ –web.console.libraries=/etc/prometheus/console_libraries \ –web.external-url=http://34.89.26.156:9090 \ –storage.tsdb.retention.time=1y [Install] WantedBy=multi-user.target

How can I ‘join’ two metrics in a Prometheus query?

You can use the argument list of group_left to include extra labels from the right operand (parentheses and indents for clarity): ( max(consul_health_service_status{status=”critical”}) by (service_name,status,node) == 1 ) + on(service_name,node) group_left(env) ( 0 * consul_service_tags ) The important part here is the operation + on(service_name,node) group_left(env): the + is “abused” as a join operator (fine … Read more

How to calculate containers’ cpu usage in kubernetes with prometheus as monitoring?

This I’m using to get CPU usage at cluster level: sum (rate (container_cpu_usage_seconds_total{id=”https://stackoverflow.com/”}[1m])) / sum (machine_cpu_cores) * 100 I also track the CPU usage for each pod. sum (rate (container_cpu_usage_seconds_total{image!=””}[1m])) by (pod_name) I have a complete kubernetes-prometheus solution on GitHub, maybe can help you with more metrics: https://github.com/camilb/prometheus-kubernetes

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)