gmauleon / alertmanager-zabbix-provisioner

Zabbix provisioner to automatically create host/items/triggers from Prometheus rules
13 stars 12 forks source link

items haven't been created. #9

Open siuwwong5 opened 4 years ago

siuwwong5 commented 4 years ago

after i start the provisioner, i found these logs. and cannot found item created. please help.

time="2020-04-21T07:25:10Z" level=info msg="loading configuration at '/etc/provisioner/config.yaml'" time="2020-04-21T07:25:10Z" level=info msg="configuration loaded" time="2020-04-21T07:25:10Z" level=info msg="GetHostGroupsByState = State: Equal, Name: prometheus" time="2020-04-21T07:25:10Z" level=info msg="GetHostByState = State: Equal, Name: prometheus" time="2020-04-21T07:25:10Z" level=info msg="Updating host: prometheus"

[root@coshk3cvdv00294 zabbix_provisioner]# cat ../alertmanager/data/alert.rules groups:

siuwwong5 commented 4 years ago

[root@coshk3cvdv00294 zabbix_provisioner]# cat config.yaml # URL to the Status/Rules page rulesUrl: http://coshk3cvdv00294:9090/rules

# Polling interval in seconds rulesPollingInterval: 3600

# Full URL to your Zabbix API zabbixApiUrl: http://coszbxdev.iris.cl.sh.cos/api_jsonrpc.php

# If your Zabbix server use internal certificates, you can provide a CA bundle for your company (or leave it blank) zabbixApiCAFile:

# This can also be set via the environment variable ZABBIX_API_USER zabbixApiUser:

# This can also be set via the environment variable ZABBIX_API_PASSWORD zabbixApiPassword:

# Zabbix items key prefix, keys will be zabbixKeyPrefix.alertname zabbixKeyPrefix: prometheus

# List of host configuration zabbixHosts: # Name of the host in zabbix

Gigabeats commented 4 years ago

I'm getting the same problem: the pod works fine with any errors, but no rules or items are loaded to zabbix.

cat /prometheus/alert.rules

The provisioner logs: time="2020-06-30T10:54:52Z" level=info msg="loading configuration at '/etc/provisioner/config.yaml'" time="2020-06-30T10:54:52Z" level=info msg="configuration loaded" time="2020-06-30T10:54:53Z" level=info msg="GetHostGroupsByState = State: Equal, Name: kubernetes" time="2020-06-30T10:54:53Z" level=info msg="GetHostGroupsByState = State: Equal, Name: prometheus" time="2020-06-30T10:54:53Z" level=info msg="GetHostByState = State: Equal, Name: PrometheusDev" time="2020-06-30T10:54:53Z" level=info msg="Updating host: PrometheusDev"

The used config file: apiVersion: v1 kind: ConfigMap metadata: name: alertmanager-zabbix-provisioner-config namespace: monitoring data: config.yaml: |+ rulesUrl: http://dev-prometheus.com/rules rulesPollingTime: 3600 zabbixApiUrl: http://dev-zabbix.com/zabbix/api_jsonrpc.php zabbixKeyPrefix: prometheus zabbixHosts:

Need your help Gael, pls.

Gigabeats commented 4 years ago

The config file is idented.