J’ai pu voir que cela ne se lançait pas dans /usr/local/var/log/prometheus.err.log, sans arrêt j’ai l’erreur :
component=activeQueryTracker msg="Failed to create directory for logging active queries"
J’ai donc modifié le fichier /usr/local/Cellar/prometheus/2.13.1/homebrew.mxcl.prometheus.plist et pas le fichier /Users/XXXXXX/Library/LaunchAgents/homebrew.mxcl.prometheus.plist (inutile)
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>homebrew.mxcl.prometheus</string> <key>ProgramArguments</key> <array> <string>sh</string> <string>-c</string> <string>/usr/local/opt/prometheus/bin/prometheus $(< /usr/local/etc/prometheus.args)</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <false/> <key>WorkingDirectory</key> <string>/usr/local/opt/prometheus</string> <key>StandardErrorPath</key> <string>/usr/local/var/log/prometheus.err.log</string> <key>StandardOutPath</key> <string>/usr/local/var/log/prometheus.log</string> </dict> </plist>
Je relance :
$ brew services restart prometheus Stopping `prometheus`... (might take a while) ==> Successfully stopped `prometheus` (label: homebrew.mxcl.prometheus) ==> Successfully started `prometheus` (label: homebrew.mxcl.prometheus)
Attention pour l’écoute c’est 0.0.0.0 et pas 127.0.0.1 : http://0.0.0.0:9090 .