Ad Widget

Collapse

Smokeping replacement?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • culrich
    started a topic Smokeping replacement?

    Smokeping replacement?

    So I have been trying to get rid of all our special-purpose monitoring tools and use zabbix instead.

    So far things have been going pretty well in replacing the functionality of nagios and cacti and smokeping, and things are typically better under zabbix than under a special purpose tool.

    One question I had was -- how do I replace smokeping's 'send a bunch of pings and graph both the latency *and* packet loss' probe in a single test? As far as I can tell, I need to send 6 packets to measure latency, then another 6 to measure packet loss.

    What am I missing?

  • cserf
    replied
    Zabbix 4.0.0

    What variable is to be used in Primary Smoke Indicator to properly indicate the name of monitored host in zabbix:
    When using host.host:
    zbxsmokepingprimary[{$PRIMARYIP},6,1000,68,{HOST.HOST}]
    zabbix shows the items
    PrimaryLatencyAvg, PrimaryLatencyMaxPrimaryLatencyMin,PrimaryLoss
    as unsupported and comment is ' Value "-v" of type "string" is not suitable for value type "Numeric (float)" '

    When I put HOST.NAME or something different it shows all items supported but no data on graph

    using shell command
    ./zbxsmokepingprimary 192.168.1.10 6 1000 68 NameOfHostInZabbix
    works perfectly - puts data to the graph

    Rafal

    Leave a comment:


  • pkowal
    replied
    Just in case anyone needs to use fping to gather information longer than 30 seconds in zabbix 3.x (which is the max value for zabbix external script timeout).

    Create bash script as a wrapper to spawn a child process:

    exec zbxsmokeping "[email protected]" &

    Don't forget to close stdout and stderr in zbxsmokeping before launching fping:

    exec 1>&-
    exec 2>&-

    This should make the wrapper exit instantly, and trapper collect the data.

    Leave a comment:


  • sles
    replied
    Hello!

    Just found this thread.
    I don't think script and template here is smokeping replacement-
    smokeping shows you not only min/average/max delay , it really shows each ping, main advantage of smokeping is how it graphically displays data.
    Could you tell me is it really possible to replace smokeping ?

    Thank you!

    Leave a comment:


  • midnight_man
    replied
    Hi guys,

    I still cant make this template working. I have both templates and scripts which are here in this thread.

    I changed timeout in server config to 12ms
    Edit IP in script
    edit fping path to usr/bin/fping

    maybe need edit path for zabbix sender? ( I have zabbix 3.2)

    still NO DATA in graph

    thanks

    Leave a comment:


  • ursal
    replied
    Hi!
    Made some changes is script on my Ubuntu 14.04, zabbix 2.2.2
    Quotes on Hostname variable for hostnames with spaces and grep "failed: 1" instead of "Failed 1", because of different zabbix output format

    $ZBXSENDER -z $ZBXSERVER -p 10051 -s "$HOSTNAME" -k SmokePingLoss -o ${tab[0]} -v | grep "failed: 1"



    You can also use
    #!/bin/bash
    # show all command before execution
    #set -x #echo on
    for command execution debugging

    Leave a comment:


  • mbsit
    replied
    I don't know you have my version or modified one but in the script you have to set IP of new zabbix server:

    ...
    #!/bin/bash
    # Where is your zabbix server
    ZBXSERVER=127.0.0.1 <-
    ...

    Leave a comment:


  • ApolloDS
    replied
    Hi adg,
    It seems that the zabbix_sender cannot send the data to the zabbix server.
    I have everything running with 2.4.5 on LTS 14.04.

    Maybe you see more when you enable debugging in the script?

    Leave a comment:


  • adg
    replied
    Moved server

    I've moved to a new server, and update Zabbix to 2.4.5 on Ubuntu LTS 14

    The config has been moved, however, the script doesn't work on the new server.

    I get a timeout issue, however, the timeout value in zabbix_server.conf matches the working one, at 30 seconds.

    [email protected]:/usr/lib/zabbix/externalscripts$ ./zbxsmokepingprimary 127.0.0.1 6 1000 68 127.0.0.1
    fping -b 68 -c 6 -q -p 1000 127.0.0.1
    zabbix_sender [9665]: Warning: timeout while executing operation
    zabbix_sender [9917]: Warning: timeout while executing operation
    zabbix_sender [10082]: Warning: timeout while executing operation

    Anyone had a similar issue?

    Leave a comment:


  • abjornson
    replied
    One other question - default behavior of the "real" smokeping sends 20 pings in 5 minutes.

    It seems like since timeout is limited to 30 seconds in the zabbix server config, it wouldn't be possible to replicate this...correct?

    Leave a comment:


  • abjornson
    replied
    Hmm, seems like this is working intermittently for me. Seems like maybe this is working for zabbix hosts with no spaces in their names but maybe not working for zabbix hosts with spaces?

    adg - on your IP address on graph issue. It seems like if you're running Zabbix pre-2.2.2rc1 or newer you can use macros (like {HOST.IP}) in graph names...which I think would get you what you want? I'm running an older version and can't test this.

    https://support.zabbix.com/browse/ZBX-7590

    Leave a comment:


  • adg
    replied
    Great

    You'll have noticed I've put 'primary' on the end, as I've duplicated the script (replacing occurrences of primary with secondary) to monitor multiple connections.

    I'd be interested if anyone can advise how to put the IP address on the graph for easy identification.

    Leave a comment:


  • abjornson
    replied
    Thanks! I think I've got it working!

    The step I was actually missing when running the script and I was getting the "Failed 1" lines is that I was calling the tool wrong.

    I didn't realize that I had to attach the template to the host I was using to test, and that I had to use the host's name in zabbix as the last argument of the zbxsmokeping call.

    i.e.:

    ./zbxsmokepingprimary <host ip> 6 1000 68 <name of host in zabbix>

    Leave a comment:


  • adg
    replied
    I managed to get it working, and have it running live under Ubuntu 12.04.

    I've attached the template and script i'm using. Let me know if it helps.

    zbxsmokeprimary should have no file extension, however, an extension is required to upload
    Attached Files

    Leave a comment:


  • abjornson
    replied
    did anyone resolve this?

    Getting the same response when running zbxsmokeping from the command line

    [email protected]:/usr/lib/zabbix/externalscripts# ./zbxsmokeping 127.0.0.1 6 1000 68 127.0.0.1
    info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000027"
    info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000027"
    info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000024"
    info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000025"

    Leave a comment:

Announcement

Collapse
No announcement yet.
Working...
X