Strongswan IPSec metrics.



  • Hi @zack. Not pushing, just wondering if you have any more thoughts on this? Anything I can do to help push this forward (other than learning regex better 🙂 ).


  • Staff

    Hey @pnunn,

    I think they only way forward to experiment with regex. Here is a cool resource to improve your skills: https://regexone.com/

    Keep us posted!

    Cheers 🙂



  • Thanks @OdysLam, I’ll have a look and see if I can make any progress. I thought I did have the regex right, but it seems it breaks as part of sed (although that’s more than likely because I have no clue). I’ll have a look at the tutorial and see if I can even work out what the original one was meant to be doing.


  • Staff

    No worries, just make sure to keep us posted. I will be genuinely happy if do find the solution and share it back, I will certainly learn a thing or two about regex 🎖



  • OK, looks like I was barking up the wrong tree entirely.

    I just ran the original sed command (worked out I could just pull it out and run it as is) and it worked as required… sigh… so, back to the drawing board and have a look at where the real problem is :).

    Sorry for wasting so much of everone’s time (including mine), and apologies to the original author of the script.



  • Ughhh… OK, now netdata is totally broken.

    It seemed the chart should work. Debug gives

    2020-09-09 10:16:50: charts.d: DEBUG: strongswan: loading module: ‘/opt/netdata/usr/libexec/netdata/plugins.d/…/charts.d/strongswan.chart.sh’ 2020-09-09 10:16:50: charts.d: DEBUG: strongswan: loading module configuration: ‘/opt/netdata/usr/lib/netdata/conf.d/charts.d/strongswan.conf’ 2020-09-09 10:16:50: charts.d: DEBUG: strongswan: loading module configuration: ‘/opt/netdata/etc/netdata/charts.d/strongswan.conf’ 2020-09-09 10:16:50: charts.d: ERROR: strongswan: Got the ipsec command OK 2020-09-09 10:16:50: charts.d: DEBUG: strongswan: module ‘strongswan’ activated 2020-09-09 10:16:50: charts.d: DEBUG: main: activated modules: strongswan 2020-09-09 10:16:50: charts.d: DEBUG: main: requested to run only for: ‘strongswan’ 2020-09-09 10:16:50: charts.d: DEBUG: main: activated charts: strongswan 2020-09-09 10:16:50: charts.d: DEBUG: strongswan: calling ‘strongswan_create()’… CHART strongswan.103_127_113_10_net ‘103.127.113.10_net’ “StrongSwan Tunnel 103.127.113.10 Traffic” “kilobits/s” “103.127.113.10” strongswan.net area 90000 5
    DIMENSION in ‘’ incremental 8 1000
    DIMENSION out ‘’ incremental -8 1000
    CHART strongswan.103_127_113_10_rekeyring ‘103.127.113.10_rekeyring’ “strongswan Tunnel 103.127.113.10 Rekeyring” “seconds” “103.127.113.10” strongswan.rekeyring line 90001 5
    DIMENSION rekeyring ‘’ absolute 1 1
    CHART strongswan.103_127_113_10qld_net ‘103.127.113.10QLD_net’ “StrongSwan Tunnel 103.127.113.10QLD Traffic” “kilobits/s” “103.127.113.10QLD” strongswan.net area 90000 5
    DIMENSION in ‘’ incremental 8 1000
    DIMENSION out ‘’ incremental -8 1000
    CHART strongswan.103_127_113_10qld_rekeyring ‘103.127.113.10QLD_rekeyring’ “strongswan Tunnel 103.127.113.10QLD Rekeyring” “seconds” “103.127.113.10QLD” strongswan.rekeyring line 90001 5
    DIMENSION rekeyring ‘’ absolute 1 1
    2020-09-09 10:16:50: charts.d: DEBUG: strongswan: ‘strongswan’ initialized.
    2020-09-09 10:16:50: charts.d: DEBUG: main: run_charts=’ strongswan’
    CHART netdata.plugin_chartsd_strongswan ‘’ ‘Execution time for strongswan plugin’ ‘milliseconds / run’ charts.d netdata.plugin_charts area 145000 5
    DIMENSION run_time ‘run time’ absolute 1 1
    2020-09-09 10:16:50: charts.d: DEBUG: strongswan: sleeping for 4.862 seconds.
    BEGIN strongswan.103_127_113_10_net
    SET in = 0
    SET out = 0
    END
    BEGIN strongswan.103_127_113_10_rekeyring
    SET rekeyring = 0
    END
    BEGIN strongswan.103_127_113_10qld_net
    SET in = 0
    SET out = 0
    END
    BEGIN strongswan.103_127_113_10qld_rekeyring
    SET rekeyring = 0
    END
    BEGIN netdata.plugin_chartsd_strongswan
    SET run_time = 40
    END
    2020-09-09 10:16:55: charts.d: DEBUG: strongswan: sleeping for 4.952 seconds.
    BEGIN strongswan.103_127_113_10_net 5000000
    SET in = 0
    SET out = 0
    END
    BEGIN strongswan.103_127_113_10_rekeyring 5000000
    SET rekeyring = 0
    END
    BEGIN strongswan.103_127_113_10qld_net 5000000
    SET in = 0
    SET out = 0
    END

    However, netdata is now showing absolutely nothing… empty graphs from top to bottom.

    Now what?



  • OK, this may be because I upgraded netdata amoungst all of this… I removed the strongswan.chart.sh and restarted netdata, and still have no graphs… sigh.



  • OK, is the nightly build broken? I’ve just uninstalled netdata, then tried to re-install it and I’m getting

    curl -q -sSL --connect-timeout 10 --retry 3 --output /tmp/netdata-kickstart-D57JlysXhW/netdata-latest.tar.gz https://storage.googleapis.com/netdata-nightlies/netdata-latest.tar.gz OK

    ABORTED Tarball checksum validation failed. Stopping netdata installation and leaving tarball in /tmp/netdata-kickstart-D57JlysXhW

    From running the kickstart file.



  • Yep… the checksum is indeed wrong.
    sha256sum netdata-latest.tar.gz gives 30ea5ee82d5a5c6d821d1d01f48523e45744d8f95a95dcb72b450b0e90f27e9c while the sha256sum.txt file has
    e4124e3213aa077a25333a359b8235910bcda8cca3c787cbdfb5a2f3cdbac120 *./netdata-latest.tar.gz

    Peter.


  • Staff

    As I said in the other thread, we are investigating it internally.

    Thanks for reporting this. After we fix this, let’s make sure that you have no problems with your charts.

    Take care buddy.


Log in to reply