prometheus-community / stackdriver_exporter

Google Stackdriver Prometheus exporter
Apache License 2.0
257 stars 97 forks source link

Need Systemd config for Stackdriver_exporter #137

Open syamasri1983 opened 2 years ago

syamasri1983 commented 2 years ago

AII! 1.Iam trying to run the stack driver Exporter query as a service but it is not working for me. Could some one help me?

[Unit] Description=Stackdriver exporter After=network-online.target Before=shutdown.target reboot.target [Service] ExecStart=/bin/bash /root/stackdriver_exporter-0.11.0.linux-amd64 \ --stackdriver_exporter google.project-id -monitoring.metrics-type-prefixes compute.googleapis.com,storage.googleapis.com \ --web.listen-address="0.0.0.0:9255" RemainAfterExit=true [Install] WantedBy=multi-user.target

I am getting following error: Warning: The unit file, source configuration file or drop-ins of stackdriver_exporter.service changed on disk. Run 's> ● stackdriver_exporter.service - Stackdriver exporter Loaded: loaded (/lib/systemd/system/stackdriver_exporter.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2021-12-29 15:27:49 UTC; 1h 55min ago Process: 25883 ExecStart=/root/stackdriver_exporter-0.11.0.linux-amd64 \ (code=exited, status=203/EXEC) Main PID: 25883 (code=exited, status=203/EXEC) Dec 29 15:27:49 gcp120928 systemd[1]: Started Stackdriver exporter. Dec 29 15:27:49 gcp120928 systemd[25883]: stackdriver_exporter.service: Failed to execute command: Permission denied Dec 29 15:27:49 gcp120928 systemd[25883]: stackdriver_exporter.service: Failed at step EXEC spawning /root/stackdrive> Dec 29 15:27:49 gcp120928 systemd[1]: stackdriver_exporter.service: Main process exited, code=exited, status=203/EXEC Dec 29 15:27:49 gcp120928 systemd[1]: stackdriver_exporter.service: Failed with result 'exit-code'.

  1. Is is possible to configure stackdriver exporter in prometheus.yml? Could you please provide a sample file or code for that too?
syamasri1983 commented 2 years ago

Could any moderators please reply, I am very much in need of this issue to be resolved, thanks for your help