Ad Widget

Collapse

icmppingsec returns rta in seconds

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fab
    Junior Member
    • Jun 2005
    • 22

    #1

    icmppingsec returns rta in seconds

    Hi,

    I realized that icmppingsec returns the rta in Seconds instead of miliseconds. With an average rta of less than 1ms we only see results of 0 in the graph. Only the plaintext viewings showed any results. So I patched pinger.c to return miliseconds instead of seconds.

    Code:
    --- src/zabbix_sucker/pinger.c.orig     Thu Jun 30 12:42:37 2005
    +++ src/zabbix_sucker/pinger.c  Thu Jun 30 11:09:52 2005
    @@ -268,7 +268,8 @@
                            }
                            else
                            {
    -                               snprintf(tmp,sizeof(tmp)-1,"%f",mseconds/1000);
    +                               //mseconds are okay for pings
    +                               snprintf(tmp,sizeof(tmp)-1,"%f",mseconds);
                                    process_value(SERVER_ICMPPING_KEY,ip,"1");
                                    process_value(SERVER_ICMPPINGSEC_KEY,ip,tmp);
                            }
    Regards,
    Frank.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Alternatively, you may change Multiplier (set it to 1000) in Item definition screen. No change of code required in this case.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    Working...