Closed Chandramouli-P closed 3 years ago
Hi,
If I understand correctly, First I should install prometheus-client-c library from https://github.com/digitalocean/prometheus-client-c/releases web site. I installed libprom-dev-0.1.3-Linux.deb and libpromhttp-dev-0.1.3-Linux.deb files. Still, Do I need to any thing? When I am trying to run "make" in .tar.gz file, it is giving "Docker" not available error. Can any one help me in installing this library? So, I can see "Prometheus" parameter in CoTurn configuration file.
Thank you.
Best Regards, Chandramouli.
Hello,
Good morning and any update would be appreciated. Thank you.
Best Regards, Chandramouli.
You need to install libprom and libpromhttp. After you did it coturn will detect these, and after recompile you can use it. I am not sure if the docker updated to contain these libs, so you need to make it manually..
Hello @misi ,
Good morning and as you suggested, I followed and it is working now. Here I am posting the documentation for other users:
wget https://github.com/digitalocean/prometheus-client-c/releases/download/v0.1.3/libprom-dev-0.1.3-Linux.deb sudo dpkg -i libprom-dev-0.1.3-Linux.deb wget https://github.com/digitalocean/prometheus-client-c/releases/download/v0.1.3/libpromhttp-dev-0.1.3-Linux.deb sudo dpkg -i libpromhttp-dev-0.1.3-Linux.deb sudo apt install libmicrohttpd-dev sudo apt --fix-broken install sudo dpkg -i libpromhttp-dev-0.1.3-Linux.deb
Thank you.
Best Regards, Chandramouli.
we installed prometheus and configured to collect metric from coturn server but not working,
Please guide us with installation steps, is there need any exporter to collect coturn server metric.
@chole488 first please make sure prometheus interface is active:
--prometheus
flagcurl http://turnserver_ip:9461/metrics
and get some resultsPlease find below our turnserver conf, please guide us prometheus config, we installed prometheus another machine - working fine. how to configure here to run turnserver with --prometheus flag
listening-port=3478
tls-listening-port=5349
fingerprint lt-cred-mech
server-name=call.cello.dev realm=call.cello.dev
user=celloworld:CellWORLD@2143@#
total-quota=100 stale-nonce=600
cert=/etc/letsencrypt/live/stun.call.cello.dev/cert.pem pkey=/etc/letsencrypt/live/stun.call.cello.dev/privkey.pem
min-port=32769 max-port=65535
proc-user=turnserver proc-group=turnserver
log-file=/var/log/turnserver.log
Please guide us
Hi @chole488 ,
You have to have the c client for Prometheus installed before you run the configure/make
Please see the below, also for anyone else trying to get Prometheus metrics working.
Command list from root on a fresh Ubuntu 20.04.5 LTS instance:
apt update
apt install -y make git build-essential pkg-config libssl-dev libevent-dev libmicrohttpd-dev libsystemd-dev libhiredis0.14 libmysqlclient21 libpq5 mysql-common sqlite3
wget https://github.com/digitalocean/prometheus-client-c/releases/download/v0.1.3/libprom-dev-0.1.3-Linux.deb
wget https://github.com/digitalocean/prometheus-client-c/releases/download/v0.1.3/libpromhttp-dev-0.1.3-Linux.deb
sudo dpkg -i libprom-dev-0.1.3-Linux.deb
sudo dpkg -i libpromhttp-dev-0.1.3-Linux.deb
git clone https://github.com/coturn/coturn.git
cd ./coturn
Edit configure file if you need to and change config location as required /etc
or change the binary location as required eg: /usr
- was/usr/local
./configure
make && make install
Check the binaries are in the correct place under /usr/bin - you will see the turnsever etc bins
Add the service file to /etc/systemd/system/coturn.service
systemctl enable coturn
systemctl start coturn
The above worked for me on an EC2 and you will see prometheus libs in the make output.
Then just test as described above using: curl http://turnserver_ip:9641/metrics
or adjust your scrape and you will see them hopefully.
(edit: port is 9641)
if I run
turnserver --log-file stdout --prometheus
I only get the help list as if the command is not found.
I installed coturn with apt do I have to compile it to get prometheus going?
Hi @docjojo That is correct, you need to build from source.
I did compile but
when I run
systemctl start coturn
I get
● coturn.service - LSB: coturn TURN Server
Loaded: loaded (/etc/init.d/coturn; generated)
Active: active (exited) since Mon 2023-10-16 10:33:37 UTC; 1min 9s ago
Docs: man:systemd-sysv-generator(8)
Process: 40125 ExecStart=/etc/init.d/coturn start (code=exited, status=0/SUCCESS)
CPU: 2ms
and
ss -lna | grep 3478
ss -lna | grep 5349
returns nothing - so coturn is not listening.
when I run
turnserver --log-file stdout --prometheus
I get answer on port 3478 and 9641 but I don't know which turnserver.conf is being used.
Can you help?
@docjojo
turnserver --log-file stdout --prometheus
and it runs meaning now you have a version with prometheus support. Thanks, it works now, on https://freeturn.net
Hello Team,
I would like to know that Is there any good Prometheus exporter library is available for CoTurn?
(Like below for PM2) (NodeJS): https://www.npmjs.com/package/pm2-metrics
If we get all the required parameters by using one library, it becomes very easy to monitor by using Grafana tool. Thank you.
Best Regards, Chandramouli.