I am running 24.10.0 on Raspberry Pi 4B.
My logging configuration in Luci as below,
I have custom shell script as below,
root@OpenWrt:~# cat custom_node_exporter_metrics.sh
#!/bin/sh
> /var/lib/node_exporter/textfile_collector/custom_node_exporter_metrics.sh.prom
# Example: Get the current system uptime in seconds
link_speed=$(cat /sys/class/net/eth0/speed)
uptime_seconds=$(cat /proc/uptime | awk '{print $1}')
rx_bytes=$(awk '/eth1/ {print $2}' /proc/net/dev)
tx_bytes=$(awk '/eth1/ {print $10}' /proc/net/dev)
echo "custom_link_speed{job=\"node\"} ${link_speed}" >> /var/lib/node_exporter/textfile_collector/custom_node_exporter_metrics.sh.prom
echo "custom_uptime_seconds{job=\"node\"} ${uptime_seconds}" >> /var/lib/node_exporter/textfile_collector/custom_node_exporter_metrics.sh.prom
echo "custom_rx_bytes{job=\"node\"} ${rx_bytes}" >> /var/lib/node_exporter/textfile_collector/custom_node_exporter_metrics.sh.prom
echo "custom_tx_bytes{job=\"node\"} ${tx_bytes}" >> /var/lib/node_exporter/textfile_collector/custom_node_exporter_metrics.sh.prom
And a cron schedule as below,
root@OpenWrt:~# crontab -l
@reboot /root/ddns.sh >> /root/ddns.log
#*/5 * * * * /root/ddns.sh >> /root/ddns.log
#*/1 * * * * /root/link_speed.sh
*/1 * * * * /root/custom_node_exporter_metrics.sh
root@OpenWrt:~#
And it works. I can see that every minute, /var/lib/node_exporter/textfile_collector/custom_node_exporter_metrics.sh.prom file is getting updated.
However, in Luci when I check every minute there is entry like below,
Sat Feb 22 09:38:00 2025 cron.err crond[1238]: USER root pid 19643 cmd /root/custom_node_exporter_metrics.sh
How can I know what is the error and how to fix it? Like I said cron works without issue.
Also why this error is being logged, when I have Cron logging Level set as disabled?