diy solar

diy solar

Off-grid Solar / Battery monitoring and control freeware

so 5 days later i am still stuck at same step in cheat sheet :)
following the cheat sheet prometheus installs in folder:
/home/solar/Dev/Grafana/prometheus-2.24.0-rc.0.linux-armv7
so then i edited the promethus yaml file and added:
# Global config
global:
scrape_interval: 10s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
scrape_timeout: 10s # scrape_timeout is set to the global default (10s).
#
# Test with
# ./promtool check config prometheus.yml
# and tail /var/log/messages
#
scrape_configs:
#
# Unix server data
- job_name: 'node'
static_configs:
- targets: ['localhost:9100']
BUT here is issue....
created promethus.servce and added:
[Unit]
Description=Prometheus Server Documentation=https://prometheus.io/docs/introduction/overview/ After=network-online.target
[Service]
User=pi Restart=on-failure
ExecStart=/home/solar/Dev/Grafana/prometheus-2.24.0-rc.0.linux-armv7/prometheus \
--config.file=/home/solar/Dev/Grafana/prometheus-2.24.0-rc.0.linux-armv7/prometheus.yml \
--storage.tsdb.path=/home/solar/Dev/Grafana/prometheus-2.24.0-rc.0.linux-armv7/prometheus/data
[Install]
WantedBy=multi-user.target

but when i check status it is not running. I can only assume my path is incorrect? should prometheus be installed in /home/solar/Dev/Grafana/prometheus-2.24.0-rc.0.linux-armv7 ?

Anyone have example of working install and could share a screenshot of their yaml file?
 
well i believe i got it working following a base install and different version 2.22.0 and it works:
extfile.directory=/ramdisk
bash: ./node_exporter: No such file or directory
root@raspberrypi:/home/solar# sudo systemctl status prometheus
● prometheus.service - Prometheus Server
Loaded: loaded (/etc/systemd/system/prometheus.service; enabled; vendor pr>
Active: active (running) since Sat 2021-12-11 12:24:17 CST; 5min ago
Docs: https://prometheus.io/docs/introduction/overview/
Main PID: 2414 (prometheus)
Tasks: 10 (limit: 1597)
CPU: 2.534s
CGroup: /system.slice/prometheus.service
└─2414 /home/pi/prometheus/prometheus --config.file=/home/pi/prome>

Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
Dec 11 12:24:18 raspberrypi prometheus[2414]: level=info ts=2021-12-11T18:24:18>
lines 1-20/20 (END)

But now node exporter is not happy
 
checking i get error at end

//prometheus/node_exporter-1.0.1.linux-armv7 $ ./node_exporter --no-collector.mdadm --collector.textfile.directory=/ramdisk
level=info ts=2021-12-11T18:48:01.285Z caller=node_exporter.go:177 msg="Starting node_exporter" version="(version=1.0.1, branch=HEAD, revision=3715be6ae899f2a9b9dbfd9c39f3e09a7bd4559f)"
level=info ts=2021-12-11T18:48:01.286Z caller=node_exporter.go:178 msg="Build context" build_context="(go=go1.14.4, user=root@1f76dbbcfa55, date=20200616-12:46:24)"
level=info ts=2021-12-11T18:48:01.294Z caller=node_exporter.go:105 msg="Enabled collectors"
level=info ts=2021-12-11T18:48:01.295Z caller=node_exporter.go:112 collector=arp
level=info ts=2021-12-11T18:48:01.295Z caller=node_exporter.go:112 collector=bcache
level=info ts=2021-12-11T18:48:01.295Z caller=node_exporter.go:112 collector=bonding
level=info ts=2021-12-11T18:48:01.296Z caller=node_exporter.go:112 collector=btrfs
level=info ts=2021-12-11T18:48:01.296Z caller=node_exporter.go:112 collector=conntrack
level=info ts=2021-12-11T18:48:01.301Z caller=node_exporter.go:112 collector=cpu
level=info ts=2021-12-11T18:48:01.301Z caller=node_exporter.go:112 collector=cpufreq
level=info ts=2021-12-11T18:48:01.301Z caller=node_exporter.go:112 collector=diskstats
level=info ts=2021-12-11T18:48:01.301Z caller=node_exporter.go:112 collector=edac
level=info ts=2021-12-11T18:48:01.301Z caller=node_exporter.go:112 collector=entropy
level=info ts=2021-12-11T18:48:01.301Z caller=node_exporter.go:112 collector=filefd
level=info ts=2021-12-11T18:48:01.301Z caller=node_exporter.go:112 collector=filesystem
level=info ts=2021-12-11T18:48:01.301Z caller=node_exporter.go:112 collector=hwmon
level=info ts=2021-12-11T18:48:01.301Z caller=node_exporter.go:112 collector=infiniband
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=ipvs
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=loadavg
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=meminfo
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=netclass
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=netdev
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=netstat
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=nfs
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=nfsd
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=powersupplyclass
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=pressure
level=info ts=2021-12-11T18:48:01.302Z caller=node_exporter.go:112 collector=rapl
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=schedstat
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=sockstat
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=softnet
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=stat
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=textfile
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=thermal_zone
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=time
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=timex
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=udp_queues
level=info ts=2021-12-11T18:48:01.303Z caller=node_exporter.go:112 collector=uname
level=info ts=2021-12-11T18:48:01.304Z caller=node_exporter.go:112 collector=vmstat
level=info ts=2021-12-11T18:48:01.304Z caller=node_exporter.go:112 collector=xfs
level=info ts=2021-12-11T18:48:01.304Z caller=node_exporter.go:112 collector=zfs
level=info ts=2021-12-11T18:48:01.305Z caller=node_exporter.go:191 msg="Listening on" address=:9100
level=info ts=2021-12-11T18:48:01.305Z caller=tls_config.go:170 msg="TLS is disabled and it cannot be enabled on the fly." http2=false
 
Vim is my default editor.
Personally, I find nano better. Whatever key combinations you might like/dislike, they're shown at the bottom of the screen - and you only really need Ctrl-x :·)

In fact, I basically just use Kate - unless I'm doing everything in Yakuake. (I obviously use KDE as a DE... there really isn't any other once you know it ;·)
 
i do and i assume its incorrect
[Unit]
Description=Node Exporter

[Service]
# Provide a text file location for https://github.com/fahlke/raspberrypi_exporter data with the
# --collector.textfile.directory parameter.
ExecStart=/usr/local/bin/node_exporter --collector.textfile.directory /var/lib/node_exporter/textfile_collector

[Install]
WantedBy=multi-user.target
 
i do and i assume its incorrect
[Unit]
Description=Node Exporter

[Service]
# Provide a text file location for https://github.com/fahlke/raspberrypi_exporter data with the
# --collector.textfile.directory parameter.
ExecStart=/usr/local/bin/node_exporter --collector.textfile.directory /var/lib/node_exporter/textfile_collector

[Install]
WantedBy=multi-user.target

Your node_exporter isn't installed in /usr/local right? It's wherever this './node_exporter' is located : /prometheus/node_exporter-1.0.1.linux-armv7 probably.

You also need to modify the arguments to "--no-collector.mdadm --collector.textfile.directory=/ramdisk"
 
Is someone able to make an extended cheat sheet for those that aren't familiar with Unix commands? Ideally one that you follow line by line and leaves no guessing or googling commands
 
Vi is tough to learn but it's so much faster than any other editor once you know how to use it. I only use ssh and vt100 terminals as i work remotely.
Funny. I used to repair those VT100 terminals when I worked for Digital Equipment Corp.
 
Your node_exporter isn't installed in /usr/local right? It's wherever this './node_exporter' is located : /prometheus/node_exporter-1.0.1.linux-armv7 probably.

You also need to modify the arguments to "--no-collector.mdadm --collector.textfile.directory=/ramdisk"
I had to take a break my wife was giving me the look after 5 nights trying to get this to work. I’m closer now but still a ways to go… just node exporter and then I need to figure out where to put scripts :)
 
I have tried but i just cannot complete these steps. the cheat sheet is AMAZING but is missing key steps and while i love to learn its way to difficult to grasp the few commands that are missing.
If i could make a few suggestions:
1: more detail in cheat sheet for prometheus adding to startup
(i did get it after many days very simple once you know and now runs at startup)
2: more detail in cheat sheet for node_exporter adding to startup(still cannot get it to startup automatically)
3: more detail on scripts i think you add them to rc.local but cheat sheet states a joe folder? I will admit i really have not got to this step yet due to issues with #2 :) but seems like i will have problems once i do get to it

i really think if these 3 steps were explained a bit better more people would have success. i consider myself very technical and im struggling but wont give up just yet its fun to learn new things thats why we are all here!

Thanks for providing such GREAT work and soon i hope to be using it.
 
Back
Top