Grafana and windows

Hey I don’t know if anyone asked this question in past but I cannot figure out nor find out anything about how to import data from storj Windows into grafana. Both run on the same windows machine and additionally I have an external node. It would be lovely if all the data could be displayed in one place.

Any help will be appreciated
BTW, First time working with grafana so sorry if I’m asking stupid question

1 Like

This thread however is purely about linux. I have no idea how to get that stuff working on windows without using docker.

Will give a look Thanks

1 Like

Hi, If you have Windows 10, you can enable Windows Subsystem for Linux 2 and run Ubuntu natively, and use docker.

It’s not great, so wouldn’t recommend running a node under it, but is fine for Prometheus, exporter, and Grafana.

Hope this link is allowed to external site, it has good instructions

Alternatively, download a free virtualisation stack like virtual box. install ubuntu, or alpine and install everything on one machine.

3 Likes

Wow that is a brilliant idea I will try that tomorrow, but do you think the storj exporter will run on it too?

I’m not sure about docker on WSL2 but docker in ubuntu in virtualbox works just fine. I use it every day.

yes, follow @kevink guide, but when it talks about local host, put in the IP address of machine.

Virtualbox is much, much, much easier than WSL2 :slight_smile: but wanted to give option incase you want to try.

Exporter Changes Summary for multi node

The main change is on the exporter, I point it at the Storj IP address of my nodes - you will need to run one exporter per node I think, so;

To monitor 1st Storj node, make sure --name is unique, make sure -p 9651 matches STORJ_EXPORTER_PORT, and is unique for each node, so like;

sudo docker run -d \
        --name=storj-exporter-storj1 \
        -p 9651:9651 \
        -e STORJ_API_PORT=14002 \       
        -e STORJ_HOST_ADDRESS=10.168.60.11 \
        -e STORJ_EXPORTER_PORT=9651 \
        anclrii/storj-exporter:latest

then run again for next node, like;

sudo docker run -d \
        --name=storj-exporter-storj2 \
        -p 9652:9652 \
        -e STORJ_API_PORT=14002 \
        -e STORJ_HOST_ADDRESS=172.16.16.12 \
        -e STORJ_EXPORTER_PORT=9652 \
        anclrii/storj-exporter:latest

Then on Prometheus config, you add each exporter to bring data in;

  - job_name: storj02
    scrape_interval: 30s
    scrape_timeout: 20s
    metrics_path: /
    static_configs:
     - targets: ["IP of machine running exporters:9652"]  <- match storj_exporter_port
       labels:
         instance: "storj02"

  - job_name: storj01
    scrape_interval: 30s
    scrape_timeout: 20s
    metrics_path: /
    static_configs:
     - targets: ["IP of machine running exporters:9651"] <- match storj_exporter_port
       labels:
         instance: "storj01"

Sorry, not very good at explaining, you will work it out - i’m very much like Docker, just not under windows :frowning:

1 Like

Hi all,
Im currently using running Prometheus, Grafana and storj-exporter.py under windows.
you will need https://nssm.cc/ to add prometheus and storj-exporter.py to run as service.

For Prometheus, download windows build from https://prometheus.io/download/ and extract it to a folder. Then download nssm, and run “nssm.exe install prometheus” and input the detail in the windows pop-up:
image

then add the storj-exporter target by editing prometheus.yml file
static_configs:

- targets: ['localhost:9651']
  labels:
    instance: 'PC'    

for storj-exporter, make sure you have python3 installed. Download storj-exporter.py and requirements.txt.
then run in command line: “pip install --no-cache-dir -r /requirements.txt” to install dependencies.
then run again “nssm.exe install storj-exporter” and follow example below:
image

As for grafana, i think they have windows installer that will install as service. after install you can access grafana dashboard at http://localhost:3000 and begin building the dashboard from json file.

4 Likes

Thanks it worked great

Glad I could help.
i’m not really good writing guide, hopefully someone able to write better guide for running storj-exporter+prometheus+grafana on Windows OS.

1 Like

maybe @Skyblockpro1 can write a guide since he got it working :slight_smile: (no pressure)

2 Likes

Already working on it. I will post it in a thread on its own.

3 Likes

It’s working. It have some drawbacks though - it could consume all resources (because Linux is trying to capture as much RAM as possible, even if it’s not used).