Configure External Metric Server via cli

AFAIK you just need to edit the /etc/pve/status.cfg file (you will need to create one - if it doesn't exist yet) in the following manner:

Code:
graphite: {Name}
    server {IP_Address}
    port {number}  # Defaults to 2003

influxdb: {Name}
    server {IP_Address}
    port {number}  # I believe it defaults to 8089

I've never used it though. Obviously the metric-servers must be setup accordingly - as shown in the docs you linked to in your post.
 
AFAIK you just need to edit the /etc/pve/status.cfg file (you will need to create one - if it doesn't exist yet) in the following manner:

Code:
graphite: {Name}
    server {IP_Address}
    port {number}  # Defaults to 2003

influxdb: {Name}
    server {IP_Address}
    port {number}  # I believe it defaults to 8089

I've never used it though. Obviously the metric-servers must be setup accordingly - as shown in the docs you linked to in your post.

Sorry :( no guessing.

You still need to put the Token somewhere.

That's guessing what you suggest - and it doesn't work.
 
I believe you only need a token if you are using http/s (as per docs). In any case have you tried adding a line token {token} ?
As per docs you will also need a line influxdbproto {http | https}

I known I need a token :)

I would love some (official way with a semi official stable api). The UI uses this.

The Rest API would be also ok to use - but - I didn't find it.
 
Last edited:
I would love some (official way with a semi official stable api). The UI uses this.

The Rest API would be also ok to use - but - I didn't find it.
Our API covers everything that is possible from the UI and CLI.
In this case, I think the endpoint you are searching for is /cluster/metrics/server/{id}.

You can use the pvesh tool if you'd like to do it from the CLI, e.g. sudo pvesh create /cluster/metrics/server/yourinfluxdb -server x.x.x.x -port yyy ...
 
  • Like
Reactions: Der Harry
You can use the pvesh tool if you'd like to do it from the CLI, e.g. sudo pvesh create /cluster/metrics/server/yourinfluxdb -server x.x.x.x -port yyy ...
Thank you!

Can you put this in the documentation?

I can create a ticket.
 
The pvesh (which does also have examples, here as well) and the API endpoint through our API viewer, as linked above, are both well documented already.
There is also a dedicated wiki page Proxmox VE API, which explains API usage in detail, again with more examples.

So I do not think any more is really needed.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!