-
Notifications
You must be signed in to change notification settings - Fork 161
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
Why odyssey return empty metrics? #651
Comments
Someone can expain? |
Try it with the latest version of odyssey. Maybe you don't have PROMHTTP installed |
I have built with this dockerfile FROM debian:bookworm-slim as builder
WORKDIR /tmp/
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
curl \
lsb-release \
ca-certificates \
libssl-dev \
gnupg \
openssl \
wget
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
gcc \
gdb \
git \
libpam-dev \
libzstd-dev \
zlib1g-dev \
valgrind \
libpq-dev \
vim \
postgresql-common \
postgresql-server-dev-all \
libmicrohttpd-dev \
&& wget https://github.com/digitalocean/prometheus-client-c/releases/download/v0.1.3/libprom-dev-0.1.3-Linux.deb \
&& 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 \
&& dpkg -i libpromhttp-dev-0.1.3-Linux.deb || apt --fix-broken install -y \
&& dpkg -i libpromhttp-dev-0.1.3-Linux.deb \
&& git clone https://github.com/yandex/odyssey.git \
&& cd odyssey \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DEBIAN=1 -DUSE_SCRAM=1 .. \
&& make And how I can see from build log promhttp is finded
And build can be runned with paramer in config But there is warning about cron and prom
|
Hi! Any updates on that issue? I've built it with a similar dockerfile, but it only lists metrics, LOL. |
Hi, idk what happening, I built with with this docker file and run at ubuntu 22.04 and now try at ubuntu 24.04 Endpoint return empty metrics :( |
How did you get libprom and libpromhttp libraries? |
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 |
I'd suggest stopping firewalld, ufw or iptables (whatever you have in place). Might be useful for debugging purposes |
I disabled ufw and try get metrics, still empty |
check if iptables is running |
sheldy@skb-second:~$ sudo ufw status
[sudo] password for sheldy:
Status: inactive
sheldy@skb-second:~$ sudo iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N DOCKER
-N DOCKER-ISOLATION-STAGE-1
-N DOCKER-ISOLATION-STAGE-2
-N DOCKER-USER
-N ufw-after-forward
-N ufw-after-input
-N ufw-after-logging-forward
-N ufw-after-logging-input
-N ufw-after-logging-output
-N ufw-after-output
-N ufw-before-forward
-N ufw-before-input
-N ufw-before-logging-forward
-N ufw-before-logging-input
-N ufw-before-logging-output
-N ufw-before-output
-N ufw-reject-forward
-N ufw-reject-input
-N ufw-reject-output
-N ufw-track-forward
-N ufw-track-input
-N ufw-track-output
sheldy@skb-second:~$ curl localhost:3423/metrics
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1024
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes -1
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total gauge
process_cpu_seconds_total 0
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 1375244288
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 123230402
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 65
# HELP database_len Total databases count
# TYPE database_len gauge
# HELP server_pool_active Active servers count
# TYPE server_pool_active gauge
# HELP server_pool_idle Idle servers count
# TYPE server_pool_idle gauge
# HELP user_len Total users count
# TYPE user_len gauge
# HELP msg_allocated Messages allocated
# TYPE msg_allocated gauge
# HELP msg_cache_count Messages cached
# TYPE msg_cache_count gauge
# HELP msg_cache_gc_count Messages freed
# TYPE msg_cache_gc_count gauge
# HELP msg_cache_size Messages cache size
# TYPE msg_cache_size gauge
# HELP count_coroutine Coroutines running
# TYPE count_coroutine gauge
# HELP count_coroutine_cache Coroutines cached
# TYPE count_coroutine_cache gauge
# HELP clients_processed Number of processed clients
# TYPE clients_processed gauge
# HELP client_pool_total Total database clients count
# TYPE client_pool_total gauge
# HELP avg_tx_count Average transactions count per second
# TYPE avg_tx_count gauge
# HELP avg_tx_time Average transaction time in usec
# TYPE avg_tx_time gauge
# HELP avg_query_count Average query count per second
# TYPE avg_query_count gauge
# HELP avg_query_time Average query time in usec
# TYPE avg_query_time gauge
# HELP avg_recv_client Average in bytes/sec
# TYPE avg_recv_client gauge
# HELP avg_recv_server Average out bytes/sec
# TYPE avg_recv_server gauge |
That's what I got I simply allowed all traffic on port 7777 |
What is the size of your image? I'm looking for ways to reduce the size of a final image |
Hi, I created repository which reproduce my problem https://github.com/sheldygg/odyssey-metrics-issue |
@sheldygg try to change log_stats value from no to yes in odyssey.conf and wait at least 15 seconds before curling metrics according to stats_interval 15 |
Looks like this help
|
Don't you have Segmentation Fault when getting metrics? |
No, all is ok |
I build odyssey with C Prometheus client library
Enable metrics in config with parameters:
When I try export metrics by enpdoint I receive empty metrics
What's wrong?
The text was updated successfully, but these errors were encountered: