Running Prometheus on a different port

3,495 views
Skip to first unread message

fr...@digennaro.com

unread,
Jun 3, 2016, 2:24:38 PM6/3/16
to Prometheus Developers
All;
I am very new to Prometheus and am trying to get it installed and running for the first time. Because a different service is already running on port 9090, I need to change the default port for Prometheus. I simply changed the default setting in prometheus.yml like so:

target_groups:
- targets: ['localhost:9090']

so I changed it to

target_groups:
- targets: ['localhost:9595']

However, it still trys to run on 9090. What am I missing here? Any insight at all would be greatly appreciated.

Thanks;
Frank

Christopher Baines

unread,
Jun 3, 2016, 2:36:40 PM6/3/16
to prometheus...@googlegroups.com
That just relates to what Prometheus instance you want the one you are
configuring to scrape. I would recommend keeping that change, but you
will need to actually change the port it binds to also.

If you want it to run using a different port, use the
-web.listen-address option (check the --help output for more information).

Setting this depends on how you are running Prometheus, but say if you
are using the Debian package, you would add the option in to
/etc/default/prometheus, and then restart the service.

fr...@digennaro.com

unread,
Jun 3, 2016, 3:01:31 PM6/3/16
to Prometheus Developers
On Friday, June 3, 2016 at 2:36:40 PM UTC-4, Christopher Baines wrote:


That was it. I can't thank you enough.
Regards;
Frank

Reply all
Reply to author
Forward
0 new messages