Skip to content
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

kamailio_exporter fails to scrape metrics from kamailio docker container #11

Closed
vishal-yadav opened this issue Apr 10, 2019 · 1 comment

Comments

@vishal-yadav
Copy link

vishal-yadav commented Apr 10, 2019

Keep getting below error when trying to connect the kamailio container (exposed on 5056 port):

$ ./kamailio_exporter -u "tcp://localhost:5056" -m "tm.stats,sl.stats,core.shmmem,core.uptime"
2019/04/10 18:40:30 [error] cannot read header: read tcp 127.0.0.1:61780->127.0.0.1:5056: i/o timeout
2019/04/10 18:40:37 [error] cannot read header: read tcp 127.0.0.1:61786->127.0.0.1:5056: i/o timeout
2019/04/10 18:41:35 [error] cannot read header: read tcp 127.0.0.1:61806->127.0.0.1:5056: i/o timeout
...

Fails to scrape metrics from container:

$ curl -v http://localhost:9494/metrics
...
# HELP kamailio_exporter_failed_scrapes Number of failed kamailio scrapes
# TYPE kamailio_exporter_failed_scrapes counter
kamailio_exporter_failed_scrapes 2
# HELP kamailio_exporter_total_scrapes Number of total kamailio scrapes
# TYPE kamailio_exporter_total_scrapes counter
kamailio_exporter_total_scrapes 2
# HELP kamailio_up Was the last scrape successful.
# TYPE kamailio_up gauge
kamailio_up 0
...

Kamailio container seems to be running okay.

$ docker exec -it kamailio ps -eaf
PID   USER     TIME  COMMAND
    1 0         0:00 kamailio -DD -E
   19 0         0:00 kamailio -DD -E
$ docker exec -it kamailio netstat -tnlp |grep kamailio
tcp        0      0 0.0.0.0:5056            0.0.0.0:*               LISTEN      19/kamailio

Thanks in advance!

@vishal-yadav
Copy link
Author

When checked binrpc, got to know that CTL should be listening on specific port by modparam(). Added in kamailio.cfg and started getting stats on that port from exporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant