Proxmox plugin returns: _Error in plugin: unexpected end of JSON input_
Proxmox token created for root user. Token permissions to / with Administrator privileges have been granted.
telegraf.conf:
base_url = "https://127.0.0.1:8006/api2/json"
api_token = "root@pam!xxxxxx-xxxxxxx"
node_name = "Firewall"
insecure_skip_verify = true
response_timeout = "5s"
Might be something wrong with your API token. I have to same issue but doubts about the token content/format
Can anyone post a fake token to see how it looks like?
Might be something wrong with your API token. I have to same issue but doubts about the token content/format
Can anyone post a fake token to see how it looks like?
I've tried - "telegraf-grafana" token and it won't work.
See here https://www.jamescoyle.net/how-to/2666-getting-started-with-proxmox-http-api-commands
Not working. I've seen this before. First it says that token is valid for 2 hours only. But anyway, putting _CSRFPreventionToken_ into the telegraf conf like this:
api_token = "root@pam:5F9DDEEA:KWgo687wl/2CbfvPCFwqs72Q9MCrwc+Af0zedRr7lWo"
or
putting _ticket_ value like this:
api_token = "root@pam:5F9DDEEA::BYg9d4E41OOV8pfRxkUXyOFTlAdmffAfgHNwRzFtA+rHIhWXN7wcka8g2x9Wsm8L46G5SoY2TgQPUH6feGWK4EkUndynT1ol35N7eOSyxzNgotNDsWd5D8citAE02zQhJ0cHIUL2byj4iLvAlPmNWAuRPfLAGLWWeMgXSyqRXs9SPC1uryd8LdsOdxiEdzs2aKkotMiy3E9VFpy1ckDjnVm45LmCWjUtvD8NiAisEvdsSS9rzsz9pUbV9sfwNt8p/LcOEFjfl1L18q882Th4520qLZixU2LWHIyxlCHPPIi/tqAbdeTSRHLWgF3ZF+ihI6/FkdpLaBRDZGzXHJCRTw=="
won't make plugin work.
Unless instructions on the GitHub for the plugin are not correct and not clear. Please advise.
Update: I have used the Proxmox web interface for API Token generation. However, it also doesn't work.
Something must be wrong here USER@REALM!TOKENID=UUID
In !TOKENID=UUID
It's not clear what and how should be used in TOKENID=UUID.
If
"CSRFPreventionToken": "5F9DDEEA:KWgo687wl/2CbfvPCFwqs72Q8MCrwc+Af0zedRr7lWo"
than
telegraf configuration should look like this:
api_token = "root@pam!5F9DDEEA:KWgo687wl/2CbfvPCFwqs72Q8MCrwc+Af0zedRr7lWo"
or
api_token = "root@pam!TOKENID=5F9DDEEA:KWgo687wl/2CbfvPCFwqs72Q8MCrwc+Af0zedRr7lWo"
In other words, should TOKENID word to be in the parameter? Though I've tried all possible combinations and none of them works.
For me this worked:
However, I'm now facing the same issue with node_name not found as in issue #8300
Many thanks @jstehlik your instruction worked fine.
Closing this issue.
Most helpful comment
For me this worked:
Token ID: telegraftest@pam!monitoring
Secret: 2ad31dce-1a08-4b9f-a284-766f71e1bd58
However, I'm now facing the same issue with node_name not found as in issue #8300