pterodactyl_exporter icon indicating copy to clipboard operation
pterodactyl_exporter copied to clipboard

Error if the node is under contract

Open CodeExplorerX opened this issue 1 year ago • 7 comments

If the node is under maintenance, then pterodactyl_exporter returns an error and stops scanning all servers, spamming the error console.

2024-07-31 17:06:55 | Init successful! 2024-07-31 17:07:05 | An error occurred: Fetch metrics for Server Name

CodeExplorerX avatar Jul 31 '24 14:07 CodeExplorerX

mostly an error on my part since I'm using an old version of Pterodactyl. And if the server has the status “supsended” or the node is undergoing technical work. Then /api/client/servers/{server.id}/resources returns a response with code 409. image

What helped me fix the error was not a big change in http_client: https://pastebin.com/PQvK1NGT

CodeExplorerX avatar Jul 31 '24 14:07 CodeExplorerX

Ok. I remember, that the were several problems with nodes in maintenance mode. I'll add an additional check to only process the data from nodes that return 200.

LOENS2 avatar Jul 31 '24 14:07 LOENS2

Ok. I remember, that the were several problems with nodes in maintenance mode. I'll add an additional check to only process the data from nodes that return 200.

One more thing in Grafana there is a warning in Network Trafics, but it collects information about the network image

CodeExplorerX avatar Jul 31 '24 14:07 CodeExplorerX

I don't exactly know what the problem is with that. I've already asked the Grafana devs about it and they told me that this is because I don't stick to the conventions. You can ignore that if everything works as expected.

LOENS2 avatar Jul 31 '24 14:07 LOENS2

Could you please tell me witch version of the Pterodactyl Panel you are using, because I'm not able to replicate the problem on my testing system.

I get the:

2024-07-31 17:06:55 | Init successful!
2024-07-31 17:07:05 | An error occurred:

But the exporter successfully keeps on exporting the other nodes' metrics, so that error is likely exclusive to your specific panel version.

LOENS2 avatar Jul 31 '24 15:07 LOENS2

Could you please tell me witch version of the Pterodactyl Panel you are using, because I'm not able to replicate the problem on my testing system.

I get the:

2024-07-31 17:06:55 | Init successful!
2024-07-31 17:07:05 | An error occurred:

But the exporter successfully keeps on exporting the other nodes' metrics, so that error is likely exclusive to your specific panel version.

1.11.3

CodeExplorerX avatar Jul 31 '24 15:07 CodeExplorerX

Unfortunately, I'm not able to recreate that error. I've switched versions of the panel and wings all throughout the 1.11.x versions and nothing. All works as expected. The exporter doesn't restart, and the panel doesn't return code 409 either. I'm starting to wonder if this has its origins in the general installation of the panel. I use Caddy as a web server, but I've also tested the ginx installation and both work fine, no matter which panel version is used. Could you please tell me which web server you are using? And what is holding you back from updating your panel to the newest version.

LOENS2 avatar Aug 03 '24 10:08 LOENS2

Hi there. At long last, I've finally fixed the issue. Version 1.0.7 of the exporter should now be able to properly work with nodes that are under maintenance.

LOENS2 avatar Oct 25 '25 15:10 LOENS2