-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Steps works but no graph on :1999 port ? #5
Comments
Hello friend, which graph are we talking about in grafana? Can you include a screenshot for me? Make sure to add your data source as well in grafana |
Please do not forget to update the IP address in the Prometheus.yml file. Change 10.0.5.1 to your routers IP address. You should be able to scrape your data and then the graphs should work. scrape_configs:
|
sure, lets troubleshoot it :) give me some seconds |
have in consideration these steps on my bpi-r3 with OpenWrt 23.05.0-rc2, r23228-cd17d8df2a :
`root@OpenWrt: === Please set the IP address to point to your Home Server (Where Docker is installed) ============HOMESERVER="192.168.1.1" === Set Custom Alias for clear as cls ============mkdir -p /etc/profile.d === Update repo =============echo 'Updating software packages' List of software to check and installsoftware="netperf openssh-sftp-server vnstat2 vnstati2 luci-app-vnstat2 netifyd collectd collectd-mod-iptables collectd-mod-ping luci-app-statistics collectd-mod-dhcpleases prometheus prometheus-node-exporter-lua prometheus-node-exporter-lua-nat_traffic prometheus-node-exporter-lua-openwrt prometheus-node-exporter-lua-uci_dhcp_host prometheus-node-exporter-lua-wifi prometheus-node-exporter-lua-wifi_stations" Loop through the list of softwarefor s in $software Check if the software is installedopkg list-installed | grep -q "^$s -" echo 'Installing IPTMON 1.6.1 from GitHub' ipt=$(uci show dhcp.@dnsmasq[0].dhcpscript | grep "iptmon") #Changing vnstat backup location to SD Card. echo 'Installing WrtBWmon' #Copying scripts and lua files to router echo 'Copying custom LUA Files from GIT to router' #echo 'Copying Extra files' #Adding new_device.sh script to dhcp dnsmasq #Adding scripts to Crontab === Setting up app-statistics and prometheus configs =============echo 'updating prometheus config from loopback to lan' === Updating CollectD export ip ==============echo 'updating luci_statistics server export config to ${HOMESERVER}' === Setting up DNS ===========L=$(uci show dhcp.lan.dhcp_option | grep "$HOMESERVER") === Setting Services to enable and restarting Services =============echo 'Enable and Restart services' ===echo 'You should restart the router now for these changes to take effect...' then its suposed to be on 192.168.1.1:9100 ? or i am missing a big step ? (complete new on it man... sorry) ` |
but when on web : ERROR: File Not Found. |
|
`root@OpenWrt:~# nmap 192.168.1.1 -p 9100 PORT STATE SERVICE Nmap done: 1 IP address (1 host up) scanned in 0.40 seconds `root@OpenWrt:~# curl 192.168.1.1:9100/metrics TYPE node_scrape_collector_duration_seconds gaugeTYPE node_scrape_collector_success gaugenode_scrape_collector_duration_seconds{collector="bmx6"} 0.00016212463378906 TYPE node_nf_conntrack_entries gaugenode_nf_conntrack_entries 191 TYPE node_nf_conntrack_entries_limit gaugenode_nf_conntrack_entries_limit 65536 TYPE node_boot_time_seconds gaugenode_boot_time_seconds 1689254653 TYPE node_context_switches_total counternode_context_switches_total 696768 TYPE node_cpu_seconds_total counternode_cpu_seconds_total{cpu="cpu0",mode="user"} 3.99 TYPE node_intr_total counternode_intr_total 394661 TYPE node_forks_total counternode_forks_total 12176 TYPE node_procs_running_total gauge` |
|
Your 192.168.1.1:9100/metrics output seems a little short. Did all the shell script and lua files copy? I think your best bet is to move Docker stuff over to a x86 linux node and try that first. |
Hi, the metrics i cut then to dont feed much in here, thats a new version yes, because its an bpi-r3, so you think its not possible to work !? :( |
I haven't tested it like that. I would try some telnets and see if you can connect from docker to the router Prometheus |
give me an email i will send you credentials to router access if i understand well :) ssh/https access, would be very very nice if we could manage it to work as its very stable/safe system, i was testing fortinet and i find it boring as hell xD but "have the graphics wich help a lot :/ |
What's your time zone? We can probably work something out. |
Do you have an x86 Linux with docker? |
no my friend :) its actually an "bpi-r3" (https://wiki.banana-pi.org/Banana_Pi_BPI-R3) with openwrt i can put it in a old router and downgrade the version too but it will be slow as hell ... so i have this router with docker, i can make a new installation and then start from zero (snapshot openwrt) im in spain now its gmt/utc/cest+1 and you? (but i dont mind about time ah we can do it the time ure avaliable. |
Thanks for sharing this !!
actually all those steps works but i cant get to the graph, why!?
`
=== Please set the IP address to point to your Home Server (Where Docker is installed) ============
HOMESERVER="192.168.1.1"
echo "Using IP Address: ${HOMESERVER} for HomeServer (where Docker is installed)"
=== Updating CollectD export ip ==============
echo 'updating luci_statistics server export config to ${HOMESERVER}'
sed -i "s/192.168.1.1/${HOMESERVER}/g" /etc/config/luci_statistics
=== Setting up DNS ===========
L=$(uci show dhcp.lan.dhcp_option | grep "$HOMESERVER")
if [[ -z "$L" ]]; then
echo "Adding $HOMESERVER DNS entry to LAN Interface"
uci add_list dhcp.lan.dhcp_option="6,${HOMESERVER}"
uci commit dhcp
elif [[ -n "$L" ]]; then
echo "${HOMESERVER} DNS was found, no changes to DNS"
fi
=== Setting Services to enable and restarting Services =============
echo 'Enable and Restart services'
/etc/init.d/cron start
/etc/init.d/cron enable
/etc/init.d/wrtbwmon enable
/etc/init.d/wrtbwmon start
#/etc/init.d/vnstat_backup enable
/etc/init.d/vnstat restart
/etc/init.d/luci_statistics enable
/etc/init.d/collectd enable
/etc/init.d/collectd restart
/etc/init.d/prometheus-node-exporter-lua restart
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart
/etc/init.d/cron restart
`
`
root@OpenWrt:~# vi /etc/netifyd.conf
Netify Agent configuration
Copyright (C) 2016-2022 eGloo Incorporated
This is free software, licensed under the GNU General Public License v3.
Read the netifyd.conf(5) man page for documentation.
See /usr/share/netifyd/netifyd.conf-sample for all possible options.
[netifyd]
enable_sink = no
[socket]
listen_path[0] = /var/run/netifyd/netifyd.sock
listen_address[0] = 192.168.1.1
[protocols]
all=include
`
root@OpenWrt:~# docker -v Docker version 24.0.2, build cb74dfc
The text was updated successfully, but these errors were encountered: