Prometheus Storj-Exporter

Solved it by let the python-script run on a different host.

thanks for monitoring :3

Hello, after the last update of the win gui 0.35.3 version, storj-exporter.py stopped working and reports the following errors:
Traceback (most recent call last):

File “C:\Users\ruben\Downloads\Storj-Exporter-0.2.4\Storj-Exporter-0.2.4\storj-exporter.py”, line 104, in
REGISTRY.register(StorjCollector())
File “C:\Users\ruben\AppData\Local\Programs\Python\Python38-32\lib\site-packages\prometheus_client\registry.py”, line 24, in register
names = self._get_names(collector)
File “C:\Users\ruben\AppData\Local\Programs\Python\Python38-32\lib\site-packages\prometheus_client\registry.py”, line 64, in get_names
for metric in desc_func():
File “C:\Users\ruben\Downloads\Storj-Exporter-0.2.4\Storj-Exporter-0.2.4\storj-exporter.py”, line 57, in collect
self.data = self.get_data()
File “C:\Users\ruben\Downloads\Storj-Exporter-0.2.4\Storj-Exporter-0.2.4\storj-exporter.py”, line 18, in get_data
return self.call_api(“dashboard”)[‘data’]
File “C:\Users\ruben\Downloads\Storj-Exporter-0.2.4\Storj-Exporter-0.2.4\storj-exporter.py”, line 15, in call_api
return response.json()
File “C:\Users\ruben\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\models.py”, line 897, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\ruben\AppData\Local\Programs\Python\Python38-32\lib\json_init
.py", line 357, in loads
return _default_decoder.decode(s)
File “C:\Users\ruben\AppData\Local\Programs\Python\Python38-32\lib\json\decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “C:\Users\ruben\AppData\Local\Programs\Python\Python38-32\lib\json\decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Thank you! It works. Unfortunately uptime graph is zero but maybe its because my node is new on network…

It needs to be updated to the latest version. see the PR in the github repository.

1 Like

that is normal because the uptime implementation has changed and is still not active in the storagenode. So until this is completely implemented in the storagenode, that graph will stay at 0.

1 Like

Thank you very much, it already works

ive nothing change on my nodes and systems, but ive since 3 hours HTTP 500 error on all nodes. ive check the nodes, and there are still runing smooth… ive reboot some nodes but the error is still there

500 message: error generating metric output.

You’ve updated your storage node on docker.
Version 0.35.3 changes the dashboard API.

I don’t establish if it can be just fixed changing the endpoint of the script in Storj-exporter, now.

In the repository there is a PR changing the endpoint. Apparently it seems to work but haven’t tried it myself yet since my nodes didn’t update yet

I would also appreciate a fix for the new storagenode version :slight_smile:

The fix is up. Even with the new docker image for the exporter.

ive stop and remove the old container, but the new container don’t run on my nodes.

I try this command:

docker run -d --link=storagenode --name=storj-exporter -p 9651:9651 anclrii/storj-exporter:latest

did you pull the latest image first?

OMG -.- im stupid ^^^^^^^^^^

I didn’t have much time to follow up here lately. I merged the api fix into master and pushed new latest docker image so you can update as needed. Default watchtower only monitors storagenode updates so may need to pull manually.

1 Like

Thank you for the fix. Works like a charm :+1: