# Prometheus Storj-Exporter

**URL:** <https://forum.storj.io/t/prometheus-storj-exporter/1939>\
**Category:** getting started\
**Tags:** monitoring\
**Created:** [September 26, 2019, 10:39am UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939 "2019-09-26T10:39:28Z")\
**Posts on this page:** 20\
**Page:** 5

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 26, 2020, 7:18am UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/85 "2020-01-26T07:18:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Cmdrd](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cmdrd/32/1128_2.png) [@Cmdrd](https://forum.storj.io/u/Cmdrd)\
**Post date:** [January 26, 2020, 7:25am UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/86 "2020-01-26T07:25:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 26, 2020, 7:38am UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/87 "2020-01-26T07:38:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![greener](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/greener/32/62_2.png) [@greener](https://forum.storj.io/u/greener)\
**Post date:** [January 26, 2020, 10:44am UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/88 "2020-01-26T10:44:26Z")

</div>

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](https://github.com/anclrii/Storj-Exporter/issues/16).

---

<div class="post-metadata">

**Author:** ![amnesia106](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/amnesia106/32/70_2.png) [@amnesia106](https://forum.storj.io/u/amnesia106)\
**Post date:** [January 28, 2020, 7:06pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/89 "2020-01-28T19:06:58Z")

</div>

![Bildschirmfoto 2020-01-28 um 20.03.06](https://storj-s3.bcdn.literatehosting.net/original/2X/4/4c96c8af86191824d01d313d6baf7c531b1decf6.png)

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

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 28, 2020, 7:11pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/90 "2020-01-28T19:11:41Z")

</div>

> [@Cross91](#):
>
> Has anybody an idea, how to get the new uptime score over prometheus in grafana?  
> The Cause is cleard in that [tread](https://forum.storj.io/t/stefan-benten-satellite-uptime-is-zero/3836/3).
> 
> I’d like to have it again shown in my grafana dashboard.  
> Thanks.

> [@kevink](#):
>
> the new system isn’t correctly working yet. So no need to add it

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

---

<div class="post-metadata">

**Author:** ![amnesia106](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/amnesia106/32/70_2.png) [@amnesia106](https://forum.storj.io/u/amnesia106)\
**Post date:** [January 28, 2020, 7:22pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/91 "2020-01-28T19:22:03Z")

</div>

thanks! 🙂

---

<div class="post-metadata">

**Author:** ![Krawi](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/krawi/32/66_2.png) [@Krawi](https://forum.storj.io/u/Krawi)\
**Post date:** [January 29, 2020, 6:54am UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/92 "2020-01-29T06:54:45Z")

</div>

Since today some graphics are missing:  
 ![Grafana V6.6.0](https://storj-s3.bcdn.literatehosting.net/original/2X/2/2a2cff6ad43ff35da7e939f568f035649fa0fa43.jpeg)

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

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 29, 2020, 7:01am UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/93 "2020-01-29T07:01:12Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Cmdrd](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cmdrd/32/1128_2.png) [@Cmdrd](https://forum.storj.io/u/Cmdrd)\
**Post date:** [January 30, 2020, 4:54am UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/94 "2020-01-30T04:54:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![selea](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/selea/32/63_2.png) [@selea](https://forum.storj.io/u/selea)\
**Post date:** [February 6, 2020, 3:27pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/95 "2020-02-06T15:27:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [February 6, 2020, 3:31pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/96 "2020-02-06T15:31:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![selea](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/selea/32/63_2.png) [@selea](https://forum.storj.io/u/selea)\
**Post date:** [February 6, 2020, 3:33pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/97 "2020-02-06T15:33:58Z")

</div>

Thanks for the answer, yes that is probably it. 🙂

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [February 6, 2020, 7:39pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/98 "2020-02-06T19:39:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![eha78](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/eha78/32/1133_2.png) [@eha78](https://forum.storj.io/u/eha78)\
**Post date:** [February 16, 2020, 3:13pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/99 "2020-02-16T15:13:20Z")

</div>

Hi,  
I just installed storj-exporter as a docker and I cannot make it work 😰  
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

---

<div class="post-metadata">

**Author:** ![MadeInGermany](https://storj.bcdn.literatehosting.com/letter_avatar/madeingermany/32/5_5575768a8748004e209b776fc1b2916d.png) [@MadeInGermany](https://forum.storj.io/u/MadeInGermany)\
**Post date:** [February 16, 2020, 3:17pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/100 "2020-02-16T15:17:53Z")

</div>

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
```
````

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [February 16, 2020, 3:36pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/101 "2020-02-16T15:36:27Z")

</div>

> [@eha78](#):
>
> requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘127.0.0.1’, port=14002)

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

---

<div class="post-metadata">

**Author:** ![eha78](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/eha78/32/1133_2.png) [@eha78](https://forum.storj.io/u/eha78)\
**Post date:** [February 16, 2020, 4:43pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/102 "2020-02-16T16:43:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![faxxe71](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/faxxe71/32/68_2.png) [@faxxe71](https://forum.storj.io/u/faxxe71)\
**Post date:** [February 16, 2020, 7:07pm UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/103 "2020-02-16T19:07:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Cross91](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cross91/32/1139_2.png) [@Cross91](https://forum.storj.io/u/Cross91)\
**Post date:** [February 26, 2020, 10:08am UTC](https://forum.storj.io/t/prometheus-storj-exporter/1939/104 "2020-02-26T10:08:45Z")

</div>

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

> **[Legacy container links](https://docs.docker.com/network/links/)**
>
> Learn how to connect Docker containers together.

Because of:

> [@greener](#):
>
> –link=storagenode

How could this be solved?

Thanks.

[Previous page](https://forum.storj.io/t/prometheus-storj-exporter/1939.md?page=4)

[Next page](https://forum.storj.io/t/prometheus-storj-exporter/1939.md?page=6)
