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.