- CheckMates
- :
- Products
- :
- Quantum
- :
- Skyline
- :
- Re: How to troubleshoot REST.py error?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to troubleshoot REST.py error?
Hello again.
So I've added 1 firewall to my prometheus server, and it worked out. Now when I try to add the 2nd one which should be identical, the python REST-script refuses the JSON-file.
Both are physical appliances running R81.10, take T81.
Error message is "error: unrecognized arguments:"
I even copied the file that enabled the telemetry from FW1 to FW2 and tried it, same problem. No TLS is used, so it's quite simple...
Any hints on where to look?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Isn't the correct syntax
/opt/CPotelcol/REST.py --set_open_telemetry "$(cat payload_kf101.json)"
i.e., in inverted commas (") ?
# ./REST.py --set_open_telemetry $(cat payload.json)
usage: REST.py [-h]
(--show_open_telemetry | --set_open_telemetry SET_OPEN_TELEMETRY)
REST.py: error: unrecognized arguments: "enabled": true, "export-targets": {"add": [
# ./REST.py --set_open_telemetry "$(cat payload.json)"
{"message": "Operation has finished successfully"}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it a cluster or another single appliance managed by same management? That error is super generic, hard to even guess, specially considering you used same file for the first firewall. Is that the only error message you get?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it's a cluster.
Here's the full output, i removed the ip-address.
/opt/CPotelcol/REST.py --set_open_telemetry $(cat payload_kf101.json)
usage: REST.py [-h] (--show_open_telemetry | --set_open_telemetry SET_OPEN_TELEMETRY)
REST.py: error: unrecognized arguments: "enabled": true, "export-targets": {"add": [ { "enabled": true, "type": "prometheus-remote-write", "url": "http://<ip>:9090/api/v1/write" } ]} }
Is there any logs anyhere or some other way to troubleshoot? different parameters?
i looked a bit at the rest.py-file, but it wasn't fun for someone that doesn't have much python experience or in-depth knowledge about this project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Isn't the correct syntax
/opt/CPotelcol/REST.py --set_open_telemetry "$(cat payload_kf101.json)"
i.e., in inverted commas (") ?
# ./REST.py --set_open_telemetry $(cat payload.json)
usage: REST.py [-h]
(--show_open_telemetry | --set_open_telemetry SET_OPEN_TELEMETRY)
REST.py: error: unrecognized arguments: "enabled": true, "export-targets": {"add": [
# ./REST.py --set_open_telemetry "$(cat payload.json)"
{"message": "Operation has finished successfully"}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It was! that was easy at least. 🙂
Human error strikes again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Easy to overlook, glad it works, thanks to @Vincent_Bacher 💪
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Checkmates
I've also embarked on this exercise.
Was able to onboard SMS and EVENT server and two Open Servers.
However, when i try to onboard a 5100 cluster both members give this output when I run the script.
[Expert@xxxxxx:0]# /opt/CPotelcol/REST.py --set_open_telemetry "$(cat payload-no-tls.json)"
File "/opt/CPotelcol/REST.py", line 1200
"(Server can be default)",file=sys.stderr)
any idea how I can troubleshoot this.
