MacOS errors when trying to add a chart



  • [ hoping this is posted in the correct place - not a git user (happy to learn if needed) ]

    Summary:

    I am attempting to add a speedtest chart to my OSX netdata installation, but when i run “charts.d.plugin debug 60 speedtest” I get the error “./loopsleepms.sh.inc: line 21: 1596096886 * 1000 + 10#N: value too great for base (error token is “10#N”)”

    Background:

    • OSX 10.15.6

    brew install bash (to get to bash v4) [ + chsh -s /usr/local/bin/bash ]
    brew install coreutils (to get timeout)
    brew install netdata (/usr/local/Cellar/netdata/1.23.2/)

    brew install speedtest-cli

    • make minor edit to “speedtest.chart.shs/speedtest-cli/speedtest/g
      (for some strange reason i get speedtest-cli file not found error, but -cli links to speedtest anyway - speedtest works #shrugs )
    • test / debug:
      /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/charts.d.plugin debug 60 speedtest
    • this errors and quits

    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/loopsleepms.sh.inc: line 21: 1596099332 * 1000 + 10#N: value too great for base (error token is “10#N”)
    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/loopsleepms.sh.inc: line 35: /proc/uptime: No such file or directory

    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/charts.d.plugin: Cannot read /proc/uptime - falling back to current_time_ms_from_date().

    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/loopsleepms.sh.inc: line 21: 1596099332 * 1000 + 10#N: value too great for base (error token is “10#N”)

    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/charts.d.plugin: Invalid setup for current_time_ms_from_uptime() - falling back to current_time_ms_from_date().

    CHART system.connectionspeed ‘’ “System Connection Speed” “Mbps” “connection speed” system.connectionspeed line 101 60
    DIMENSION down ‘Down’ absolute 1 1000000
    DIMENSION up ‘Up’ absolute 1 1000000
    2020-07-30 18:25:35: charts.d: DEBUG: speedtest: ‘speedtest’ initialized.
    2020-07-30 18:25:35: charts.d: DEBUG: main: run_charts=’ speedtest’

    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/loopsleepms.sh.inc: line 21: 1596099335 * 1000 + 10#N: value too great for base (error token is “10#N”)

    charts.d: cleaning up temporary directory /tmp/.netdata-charts.d-rI48wJHA8o ------

    Not sure if this is a netdata issue or a OSX date issue.
    How can I debug this ?

    Regards,

    • jd


    • full output:

    JD-IMAC-27:charts.d jon$ /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/charts.d.plugin debug 60 speedtest
    2020-07-30 18:25:32: charts.d: INFO: main: started from ‘/usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/charts.d.plugin’ with options: debug 60 speedtest
    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/loopsleepms.sh.inc: line 21: 1596099332 * 1000 + 10#N: value too great for base (error token is “10#N”)
    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/loopsleepms.sh.inc: line 35: /proc/uptime: No such file or directory
    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/charts.d.plugin: Cannot read /proc/uptime - falling back to current_time_ms_from_date().
    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/loopsleepms.sh.inc: line 21: 1596099332 * 1000 + 10#N: value too great for base (error token is “10#N”)
    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/charts.d.plugin: Invalid setup for current_time_ms_from_uptime() - falling back to current_time_ms_from_date().
    2020-07-30 18:25:32: charts.d: INFO: main: Configuration file ‘/usr/local/Cellar/netdata/1.23.2/lib/netdata/conf.d/charts.d.conf’ loaded.
    2020-07-30 18:25:32: charts.d: WARNING: main: Configuration file ‘/usr/local/etc/netdata/charts.d.conf’ not found.
    2020-07-30 18:25:32: charts.d: DEBUG: ap: is enabled for auto-detection.
    2020-07-30 18:25:32: charts.d: DEBUG: apcupsd: is enabled for auto-detection.
    2020-07-30 18:25:32: charts.d: INFO: example: is disabled. Add a line with example=force in ‘/usr/local/etc/netdata/charts.d.conf’ to enable it (or remove the line that disables it).
    2020-07-30 18:25:32: charts.d: DEBUG: libreswan: is enabled for auto-detection.
    2020-07-30 18:25:32: charts.d: DEBUG: nut: is enabled for auto-detection.
    2020-07-30 18:25:32: charts.d: DEBUG: opensips: is enabled for auto-detection.
    2020-07-30 18:25:32: charts.d: INFO: sensors: is disabled. Add a line with sensors=force in ‘/usr/local/etc/netdata/charts.d.conf’ to enable it (or remove the line that disables it).
    2020-07-30 18:25:33: charts.d: DEBUG: speedtest: is enabled for auto-detection.
    2020-07-30 18:25:33: charts.d: DEBUG: main: enabled charts: ap apcupsd libreswan nut opensips speedtest
    2020-07-30 18:25:33: charts.d: DEBUG: ap: loading module: ‘/usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/…/charts.d/ap.chart.sh’
    2020-07-30 18:25:33: charts.d: DEBUG: ap: loading module configuration: ‘/usr/local/Cellar/netdata/1.23.2/lib/netdata/conf.d/charts.d/ap.conf’
    2020-07-30 18:25:33: charts.d: DEBUG: ap: not found module configuration: ‘/usr/local/etc/netdata/charts.d/ap.conf’
    2020-07-30 18:25:33: charts.d: WARNING: ap: command ‘iw’ is not found in /usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
    2020-07-30 18:25:33: charts.d: ERROR: ap: module’s ‘ap’ check() function reports failure.
    2020-07-30 18:25:33: charts.d: DEBUG: apcupsd: loading module: ‘/usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/…/charts.d/apcupsd.chart.sh’
    2020-07-30 18:25:33: charts.d: DEBUG: apcupsd: loading module configuration: ‘/usr/local/Cellar/netdata/1.23.2/lib/netdata/conf.d/charts.d/apcupsd.conf’
    2020-07-30 18:25:33: charts.d: DEBUG: apcupsd: not found module configuration: ‘/usr/local/etc/netdata/charts.d/apcupsd.conf’
    2020-07-30 18:25:33: charts.d: WARNING: apcupsd: command ‘apcaccess’ is not found in /usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
    2020-07-30 18:25:33: charts.d: ERROR: apcupsd: module’s ‘apcupsd’ check() function reports failure.
    2020-07-30 18:25:33: charts.d: DEBUG: libreswan: loading module: ‘/usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/…/charts.d/libreswan.chart.sh’
    2020-07-30 18:25:34: charts.d: DEBUG: libreswan: loading module configuration: ‘/usr/local/Cellar/netdata/1.23.2/lib/netdata/conf.d/charts.d/libreswan.conf’
    2020-07-30 18:25:34: charts.d: DEBUG: libreswan: not found module configuration: ‘/usr/local/etc/netdata/charts.d/libreswan.conf’
    2020-07-30 18:25:34: charts.d: WARNING: libreswan: command ‘ipsec’ is not found in /usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
    2020-07-30 18:25:34: charts.d: ERROR: libreswan: module’s ‘libreswan’ check() function reports failure.
    2020-07-30 18:25:34: charts.d: DEBUG: nut: loading module: ‘/usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/…/charts.d/nut.chart.sh’
    2020-07-30 18:25:34: charts.d: DEBUG: nut: loading module configuration: ‘/usr/local/Cellar/netdata/1.23.2/lib/netdata/conf.d/charts.d/nut.conf’
    2020-07-30 18:25:34: charts.d: DEBUG: nut: not found module configuration: ‘/usr/local/etc/netdata/charts.d/nut.conf’
    2020-07-30 18:25:34: charts.d: WARNING: nut: command ‘upsc’ is not found in /usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
    2020-07-30 18:25:34: charts.d: ERROR: nut: module’s ‘nut’ check() function reports failure.
    2020-07-30 18:25:34: charts.d: DEBUG: opensips: loading module: ‘/usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/…/charts.d/opensips.chart.sh’
    2020-07-30 18:25:34: charts.d: DEBUG: opensips: loading module configuration: ‘/usr/local/Cellar/netdata/1.23.2/lib/netdata/conf.d/charts.d/opensips.conf’
    2020-07-30 18:25:34: charts.d: DEBUG: opensips: not found module configuration: ‘/usr/local/etc/netdata/charts.d/opensips.conf’
    2020-07-30 18:25:34: charts.d: WARNING: opensips: command ‘opensipsctl’ is not found in /usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
    2020-07-30 18:25:34: charts.d: ERROR: opensips: module’s ‘opensips’ check() function reports failure.
    2020-07-30 18:25:34: charts.d: DEBUG: speedtest: loading module: ‘/usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/…/charts.d/speedtest.chart.sh’
    2020-07-30 18:25:34: charts.d: DEBUG: speedtest: not found module configuration: ‘/usr/local/Cellar/netdata/1.23.2/lib/netdata/conf.d/charts.d/speedtest.conf’
    2020-07-30 18:25:35: charts.d: DEBUG: speedtest: not found module configuration: ‘/usr/local/etc/netdata/charts.d/speedtest.conf’
    2020-07-30 18:25:35: charts.d: DEBUG: speedtest: module ‘speedtest’ activated
    2020-07-30 18:25:35: charts.d: DEBUG: main: activated modules: speedtest
    2020-07-30 18:25:35: charts.d: DEBUG: main: requested to run only for: ‘speedtest’
    2020-07-30 18:25:35: charts.d: DEBUG: main: activated charts: speedtest
    2020-07-30 18:25:35: charts.d: DEBUG: speedtest: calling ‘speedtest_create()’…
    CHART system.connectionspeed ‘’ “System Connection Speed” “Mbps” “connection speed” system.connectionspeed line 101 60
    DIMENSION down ‘Down’ absolute 1 1000000
    DIMENSION up ‘Up’ absolute 1 1000000
    2020-07-30 18:25:35: charts.d: DEBUG: speedtest: ‘speedtest’ initialized.
    2020-07-30 18:25:35: charts.d: DEBUG: main: run_charts=’ speedtest’
    /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/loopsleepms.sh.inc: line 21: 1596099335 * 1000 + 10#N: value too great for base (error token is “10#N”)
    charts.d: cleaning up temporary directory /tmp/.netdata-charts.d-rI48wJHA8o …





  • You may want to try this
    export PATH=“/usr/local/sbin:/usr/local/opt/coreutils/libexec/gnubin:${PATH}” to make sure you are using the gnu utils date


  • Staff



  • @AussieJD

    Thanks for the help ilyam8 and zack-shoylev.
    given I have installed using homebrew, I am not sure how to “upgrade” my install… any pointers ?

    Do I update my env to include /usr/local/opt/coreutils/libexec/gnubin

    or do I somehow request an update using homebrew ?

    Aside: I can get the /usr/local/Cellar/netdata/1.23.2/libexec/netdata/plugins.d/charts.d.plugin debug 60 speedtest
    to work by adding the PATH to my “current shell” … BUT … the speedtest chart will still not appear in the web interface…


  • Staff

    i think you need to wait until netdata pkg is updated and then brew upgrade.

    Or prepend /usr/local/opt/coreutils/libexec/gnubin (if you have coreutils installed) to the PATH in the netdata.conf, see [plugins] section.

    ^^ it still wont work in debug mode but should work after netdata restart


  • Staff

    3rd option is to download fixed version of loopsleepms.sh.inc

    https://raw.githubusercontent.com/ilyam8/netdata/fedb9b2f862a0644ff93b81ca6253dded43f6f10/collectors/charts.d.plugin/loopsleepms.sh.inc

    and replace this file in your install

    to list files do

    brew list netdata


Log in to reply