Ad Widget

Collapse

problem with net.if.out[eth0] 1.1 beta8

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jvalen
    Junior Member
    • Mar 2006
    • 12

    #1

    problem with net.if.out[eth0] 1.1 beta8

    Hello:

    I think there is a problem with net.if.out[eth0] always get the same value :-(

    # zabbix_get -s 192.168.2.3 -k net.if.out[eth0]
    4294967295
    # zabbix_get -s 192.168.2.3 -k net.if.out[eth0]
    4294967295
    # zabbix_get -s 192.168.2.3 -k net.if.out[eth0]
    4294967295
    # zabbix_get -s 192.168.2.3 -k net.if.out[eth0]
    4294967295
    # zabbix_get -s 192.168.2.3 -k agent.version
    1.1beta8

    any idea ?

    redhat 2.1 esas agent

    thanks in advance

    Jorge V.S.'060422
  • marius
    Member
    • Apr 2006
    • 47

    #2
    i'm having the same problem with beta9

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      Perhaps /tmp/zabbix_agentd.tmp has no write permissions for user 'zabbix'? Then remove it and restart the agent.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • marius
        Member
        • Apr 2006
        • 47

        #4
        Originally posted by Alexei
        Perhaps /tmp/zabbix_agentd.tmp has no write permissions for user 'zabbix'? Then remove it and restart the agent.
        Nope the permissions look good. Please refer to this thread: http://www.zabbix.com/forum/showthread.php?t=2728

        Comment

        • mruk
          Junior Member
          • Apr 2006
          • 10

          #5
          I remember having problems with it, so I made a small patch:

          Code:
          diff -ruN ./zabbix-1.1beta9_org/include/sysinfo.h ./zabbix-1.1beta9/include/sysinfo.h
          --- ./zabbix-1.1beta9_org/include/sysinfo.h     2006-04-20 17:06:49.000000000 +0200
          +++ ./zabbix-1.1beta9/include/sysinfo.h 2006-05-06 19:29:53.000000000 +0200
          @@ -81,6 +81,12 @@
           int     PROC_NUM(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
           int     NET_IF_IN(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
           int     NET_IF_OUT(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
          +int    NET_IF_IBYTES1(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
          +int    NET_IF_IBYTES5(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
          +int    NET_IF_IBYTES15(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
          +int    NET_IF_OBYTES1(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
          +int    NET_IF_OBYTES5(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
          +int    NET_IF_OBYTES15(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
           int     SYSTEM_CPU_LOAD(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
           int     SYSTEM_CPU_UTIL(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
           int     SYSTEM_HOSTNAME(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
          diff -ruN ./zabbix-1.1beta9_org/src/libs/zbxsysinfo/linux/linux.c ./zabbix-1.1beta9/src/libs/zbxsysinfo/linux/linux.c
          --- ./zabbix-1.1beta9_org/src/libs/zbxsysinfo/linux/linux.c     2006-01-24 16:21:19.000000000 +0100
          +++ ./zabbix-1.1beta9/src/libs/zbxsysinfo/linux/linux.c 2006-05-06 19:30:51.000000000 +0200
          @@ -160,7 +160,7 @@
                  {"vfs.fs.inode.total",  CF_USEUPARAM,   VFS_FS_INODE_TOTAL,     0,      "/"},
                  {"vfs.fs.inode.pfree",  CF_USEUPARAM,   VFS_FS_INODE_PFREE,     0,      "/"},
           */
          -/*
          +
                  {"net.if.ibytes1",      CF_USEUPARAM,   NET_IF_IBYTES1, 0,      "lo"},
                  {"net.if.ibytes5",      CF_USEUPARAM,   NET_IF_IBYTES5, 0,      "lo"},
                  {"net.if.ibytes15",     CF_USEUPARAM,   NET_IF_IBYTES15,0,      "lo"},
          @@ -168,7 +168,7 @@
                  {"net.if.obytes1",      CF_USEUPARAM,   NET_IF_OBYTES1, 0,      "lo"},
                  {"net.if.obytes5",      CF_USEUPARAM,   NET_IF_OBYTES5, 0,      "lo"},
                  {"net.if.obytes15",     CF_USEUPARAM,   NET_IF_OBYTES15,0,      "lo"},
          -*/
          +
           /*
                  {"disk_read_ops1",      CF_USEUPARAM,   DISKREADOPS1,   0,      "sda"},
                  {"disk_read_ops5",      CF_USEUPARAM,   DISKREADOPS5,   0,      "sda"},
          As you can see, there was a syntax change and net.if.ibytes should be used instead of net.if.in and net.if.obytes should be used instead of net.if.out.

          It works fine, however I`m not shure, that the returned values are ok. I had a multiplier of 4 for about a week (checked zabbix and ifstat the same time to get it), but then another check made me use multiplier 1. Maybe that`s why it is commented out

          Comment

          • marius
            Member
            • Apr 2006
            • 47

            #6
            I ended up going with customer parameters:

            UserParameter=netin[*],grep $1 /proc/net/dev | cut -f2 -d":" | awk '{print $ 1}'
            UserParameter=netout[*],grep $1 /proc/net/dev | cut -f2 -d":" | awk '{print $ 9}'

            Took me a while to figure out I needed a space after $ in awk.

            I'm actually using "8" as the multiplier - not 100% sure if it's accurate or not.

            Comment

            Working...