Prometheus Storj-Exporter

I like it! Although a restart of 5sec seems a bit aggressive.

True, it’s mostly just to try to get in a restart before the next polling. I usually poll at 15 seconds, so this gives it at most 2 tries to restart before the next poll to hopefully avoid missing metrics. More testing should give me a better idea of expectations for time to restore functionality.

oh ok, I understand. I don’t poll my storagenode that often. I think every 2 minutes.

Awesome - thanks for adding this.
That’s now merged to master. Also see if you have any thoughts on https://github.com/anclrii/Storj-Exporter/issues/16.

Is the uptime score a different metric than before? I’ve had the problem since the databases on the satellites were changed.

So to get to 20 characters, it has changed on the satellite.

thanks! :slight_smile:

Since today some graphics are missing:
Grafana V6.6.0

Is this perhaps related to the release of Grafana V6.6 on Jan. 27, my install has yet updated to this version?

systemctl restart grafana-server

and browser reload didn’t help

Looks like the update forced the name of the satellite to be written completely before showing the bars.
If you make the audit score box wider then those bars will appear again.
Not sure how to make grafana shorten the satellite names back to 4 letters…

You should be able to configure an alias in Grafana for each of these rows if I’m not mistaken. I’d have to look at the dashboard configuration to test it out with 6.6, have not updated yet.

Question!
Let me know if it is the wrong thread:

How does the storj-exporter calculate the earnings? I got the payout today but I just got 30% of that I have earned according to the information in grafana.
What do I miss?

Maybe you didn’t calculate the held amount? depending on the age of your node you don’t get a full payout yet.

2 Likes

Thanks for the answer, yes that is probably it. :slightly_smiling_face:

Also the last week of January will be paid out next month. This is a temporary result of a change in the database that caused a delay in payouts. So you’re indeed missing a little bit.

Hi,
I just installed storj-exporter as a docker and I cannot make it work :cold_sweat:
My storj node is installed on same server, dashboard (127.0.0.1:14002) is working fine, but I get these errors in storj-exporter logs.

Traceback (most recent call last):
  File "./storj-exporter.py", line 128, in <module>
    REGISTRY.register(StorjCollector())
  File "/usr/local/lib/python3.7/site-packages/prometheus_client/registry.py", line 24, in register
    names = self._get_names(collector)
  File "/usr/local/lib/python3.7/site-packages/prometheus_client/registry.py", line 64, in _get_names
    for metric in desc_func():
  File "./storj-exporter.py", line 57, in collect
    self.data = self.get_data()
  File "./storj-exporter.py", line 18, in get_data
    return self.call_api("dashboard")['data']
  File "./storj-exporter.py", line 14, in call_api
    response=requests.get(url = "http://" + self.storj_host_address + ":" + self.storj_api_port + "/api/" + path)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=14002): Max retries exceeded with url: /api/dashboard (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9560111a10>: Failed to establish a new connection: [Errno 111] Connection refused'))

Any ideas ?
Thanks

Try the manuell installation. It helps me and a other one, who i gave this tip.

#### OR build your own

Clone this repo and cd, then

```
docker build -t storj-exporter .
docker run -d --link=storagenode --name=storj-exporter -p 9651:9651 storj-exporter
```

This is your problem. You try to connect on localhost. But inside the docker container your node is not running on localhost.

I build it using this command:

sudo docker run -d --link=storagenode --name=storj-exporter -p 9651:9651 -e STORJ_HOST_ADDRESS=127.0.0.1 -e STORJ_API_PORT=14002 anclrii/storj-exporter:latest

$ ss -nltp
    State                     Recv-Q     Send-Q           Local Address:Port             Peer Address:Port                    
    LISTEN                    0            128                  127.0.0.1:14002                  0.0.0.0:*                         
    LISTEN                    0            128                  <PUBLIC_IP>:28967            0.0.0.0:*

I dont understand what I did wrong.

API seems working, I get data from the command below :

curl -s 127.0.0.1:14002/api/dashboard

1 Like

Dear all,

if i try to import into Grafana the json file “Storj-Exporter-dashboard.json” i always get
an error:

Import failed
JSON → JS Serialization failed: JSON.parse: unexpected character at line 7 column 1 of the JSON data

What could be wrong? No idea why i cant import the dashboards files

Thanks for your support,
faxxe

Hey together,
how can I run the exporter on Unraid Docker?
Problem seems to be:

Because of:

How could this be solved?

Thanks.

1 Like