-
Please help me solve the problem of starting the service for the prometheus-nginx-exporter exporter module Installed prometheus-nginx-exporter package via Snap In the NGINX configs I added /etc/nginx/bx/site_settings/default/prometheus-nginx-exporte.conf
/etc/nginx/bx/site_avaliable/s1.conf The metric stub is sent over port 8080, everything is ok, I checked it through the browser and Curl http://127.0.0.1:8080/stub_status But the problem is the following: since prometheus-nginx-exporter does not have a daemon, I had to create Units, I created them /etc/systemd/system/nginx_exporter.service
and /etc/systemd/system/nginx_exporter.socket
But I can’t start the service, it crashes with an error, can you tell me the reasons for it? $ systemctl daemon-reload Errors in the system log when trying to start the service are:
The main thing there, it seems to me, is this, but I can’t figure out how to fix it... Failed at step USER spawning /var/lib/snapd/snap/nginx-prometheus-exporter/70/nginx-prometheus-exporter: No such process I tried changing to (based on advice from here https://superuser.com/questions/1156676/what-causes-systemd-failed-at-step-user-spawning-usr-sbin-opendkim-no-such-p)
or even remove the User and Group directives completely I need help! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @toorrp4 I think this is a problem with snap and how they manage the process. I'll try to reproduce and find a workaround and let you know. |
Beta Was this translation helpful? Give feedback.
-
Thank you, I'm really looking forward to it! It would be useful to add to your instructions. By the way, another exporter, node-exporter, follows this instruction on the same server with CentOS 7, everything was installed and working, I just had to add a rule to iptables for the port |
Beta Was this translation helpful? Give feedback.
-
Looks like the account that opened this was deleted, but for reference I was able to use the exporter installed via Snap in systemd with this config for /etc/systemd/system/nginx_exporter.service
and the rest of the config as in the opening post. |
Beta Was this translation helpful? Give feedback.
Looks like the account that opened this was deleted, but for reference I was able to use the exporter installed via Snap in systemd with this config for /etc/systemd/system/nginx_exporter.service
and the rest of the config as in the opening post.