Announcement

Collapse
No announcement yet.

In or Out Values coming as 0

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

  • In or Out Values coming as 0

    Hi there,

    Oreon + Nagios is up and running, graphs included. My problem is that, using check_centreon_traffic sometimes the values return as 0 bits. Sometimes it┤s the IN, sometimes the OUT. The graphs are all wrong due to this problem. Is this any known bug in the plug-in? How can I solve this issue?

    Thanks in advance.

  • #2
    0 value may due to a timeout while checking, no ?
    Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
    Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tunÚ
    Fedora Core 5 - 2.6.20-1.2320

    Comment


    • #3
      Hello,
      I am not very good in English, but I have the same problem.
      I think that it is a bug on the plug in check_centreon_snmp_traffic

      During the rotation of the meter, one should not pass by the branch or one deducts 4294967296

      I made a modification on the level of the part IN + OUT/Delta

      here my modification, it east can be not good but I do not have any more the values with 0

      Code:
      ## Bandwith = IN + OUT / Delta(T) = 6 Mb/s
      ## (100 * Bandwith) / (2(si full duplex) * Ispeed)
      ## Count must round at 4294967296 
      ##
      
      if (($in_bits - $last_in_bits != 0) && defined($last_in_bits)) {
              my $total = 0;
              if ($in_bits - $last_in_bits < 0){
                      $total = ((4294967296 * 8) - $last_in_bits) + $in_bits;
              } else {
                      $total = $in_bits - $last_in_bits;
              }
              my $diff = time() - $last_check_time;
              if ($diff == 0){$diff = 1;}
          my $pct_in_traffic = $in_traffic = abs($total / $diff);
      } else {
          $in_traffic = 0;
      } 
      
      if (($out_bits - $last_out_bits != 0) && defined($last_out_bits)) {
          my $total = 0;
          if ($out_bits - $last_out_bits < 0){
                      $total = ((4294967296 * 8) - $last_out_bits) + $out_bits;
          } else {
                      $total = $out_bits - $last_out_bits;
          }
          my $diff =  time() - $last_check_time;
          if ($diff == 0){$diff = 1;}
          my $pct_out_traffic = $out_traffic = abs($total / $diff);
      } else {
          $out_traffic = 0;
      }
      If could be validated by experts in Perl
      Cordially

      Viva GoolgleTranslation :-P :-P

      Comment


      • #4
        If there is a timeout, there's no value returned.
        Romain Le Merlus
        Centreon Forge
        MERETHIS

        Comment


        • #5
          Originally posted by lindusfree View Post
          Hello,
          I am not very good in English, but I have the same problem.
          I think that it is a bug on the plug in check_centreon_snmp_traffic

          During the rotation of the meter, one should not pass by the branch or one deducts 4294967296

          I made a modification on the level of the part IN + OUT/Delta

          here my modification, it east can be not good but I do not have any more the values with 0

          Code:
          ## Bandwith = IN + OUT / Delta(T) = 6 Mb/s
          ## (100 * Bandwith) / (2(si full duplex) * Ispeed)
          ## Count must round at 4294967296 
          ##
          
          if (($in_bits - $last_in_bits != 0) && defined($last_in_bits)) {
                  my $total = 0;
                  if ($in_bits - $last_in_bits < 0){
                          $total = ((4294967296 * 8) - $last_in_bits) + $in_bits;
                  } else {
                          $total = $in_bits - $last_in_bits;
                  }
                  my $diff = time() - $last_check_time;
                  if ($diff == 0){$diff = 1;}
              my $pct_in_traffic = $in_traffic = abs($total / $diff);
          } else {
              $in_traffic = 0;
          } 
          
          if (($out_bits - $last_out_bits != 0) && defined($last_out_bits)) {
              my $total = 0;
              if ($out_bits - $last_out_bits < 0){
                          $total = ((4294967296 * 8) - $last_out_bits) + $out_bits;
              } else {
                          $total = $out_bits - $last_out_bits;
              }
              my $diff =  time() - $last_check_time;
              if ($diff == 0){$diff = 1;}
              my $pct_out_traffic = $out_traffic = abs($total / $diff);
          } else {
              $out_traffic = 0;
          }
          If could be validated by experts in Perl
          Cordially

          Viva GoolgleTranslation :-P :-P
          Why it's not on bugtracker ???

          you know Opensville ? http://talk.bmc.com/blogs/blog-whurl...ley/opensville
          Julien Mathis
          Centreon Project Leader
          www.merethis.com |

          Comment


          • #6
            Hello Julio,

            Yes it was in the bugtrack

            here the link : http://bugs.oreon-project.org/?do=details&id=357

            Post of Kurty100 :

            http://forum.oreon-project.org/showthread.php?t=3529

            Cordially

            Comment


            • #7
              saved my day

              Thanks a lot for the reply. It┤s done, no more 0 values.

              Again, THANKS A LOT!!!!

              Comment


              • #8
                Ok ! plugin corrected on our SVN.

                Sorry lindusfree, don't hesitate to give us your patch. Even if your not sur... Your correction is good

                regards,
                Julien Mathis
                Centreon Project Leader
                www.merethis.com |

                Comment


                • #9
                  Je me permet de cloturer ce post en franšais
                  C'est beaucoup plus facile pour moi

                  Merci Julio

                  Pour une fois que je peux aider.
                  Ca me fait beaucoup plaisir

                  Cordialement

                  Comment

                  Working...
                  X