Ad Widget

Collapse

Network interface discovery return an empty list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rjanot
    Junior Member
    • Apr 2013
    • 4

    #1

    Network interface discovery return an empty list

    Hi everyone !

    I'm new to zabbix, so please excuse me if my question is stupid (since it doen't seems to be for me :-))

    The problem :
    I don't have items for my servers for net.if.in / net.if.out

    What I've check:

    - I've installed Zabbix 2.0.3 from source for the server and the agents.
    - My servers have the Template OS Linux which has the network interface discovery
    - My config have the regex set to
    1 » ^lo$ [Result is FALSE]
    2 » ^Software Loopback Interface [Result is FALSE]
    which is working fine when "eth0" is set in the test textarea
    - The discovery is enabled
    - when I do "zabbix_get -s my.host.com -k vfs.fs.discovery" from my zabbix server, it's giving me a correct json :
    {
    "data":[
    {
    "{#FSNAME}":"\/",
    "{#FSTYPE}":"rootfs"},
    {
    "{#FSNAME}":"\/",
    "{#FSTYPE}":"ext4"},
    ......
    - when I do "zabbix_get -s my.host.com -k net.if.discovery" from my zabbix server, it's giving me an empty json :
    {
    "data":[]}



    Any clues to help me ?

    Thanks !
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    First thing I would do is get off of 2.0.3 and upgrade to 2.0.5

    Secondly... discovery rules take up to an hour to take effect and return data once you assign the template to your hosts. You shouldn't have to change anything from the defaults in order to get your interface data.

    Are you not seeing anything under Monitoring --> Latest Data for your hosts under the category of "Network Interfaces" ?

    When I run the command as you show, this is what I receive:

    # zabbix_get -s host.ip.here -k net.if.discovery
    {
    "data":[
    {
    "{#IFNAME}":"lo"},
    {
    "{#IFNAME}":"eth2"},
    {
    "{#IFNAME}":"eth3"},
    {
    "{#IFNAME}":"eth0"},
    {
    "{#IFNAME}":"eth1"},
    {
    "{#IFNAME}":"bond0"}]}

    And I assume that if you drill down into your template: Configuration --> Templates --> Template OS Linux --> Discovery --> Item Prototypes (for Network Interface Discovery) --> Incoming network traffic on {#IFNAME} that the item configuration appears as in the below screenshot and is enabled?
    Attached Files
    Last edited by tchjts1; 17-04-2013, 19:55.

    Comment

    • rjanot
      Junior Member
      • Apr 2013
      • 4

      #3
      Hi,

      Thanks for spending some of your time to help me.

      So For the first point, Yes, I'm considering upgrading to 2.0.5 in the next few days

      For the discovery rules to take effect, I understand that it might take up to an hour, I've seen the delay in the management panel. But the problem is the server and agent are installed since the beginning of the week

      For what I see in Latest Data, I don't have the category "Network Interface", even with "Show items without data" checked. Might be a clue ?

      For the zabbix_get, I've check again, on the server, also running an agent:
      [root@pb-gate:23:05:33 ~] /opt/zabbix/bin/zabbix_get -s 127.0.0.1 -k net.if.discovery
      {
      "data":[]}

      Just to be clear, I use localhost only on this host, I's the same when I put antoher agent IP.

      For the item configuration checking : That's the same as the screenshot, but I've 2 more fields : description (blank) and enabled which is checked.

      I also link below the Discovery configuration, left intact.

      Where is the LLD IFNAME macro configured ? To know the running command, to see if the problem is the command or something else ?

      I'm running an ubuntu 12.04 LTS for both agent and server

      Thanks
      Attached Files

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        selinux or similar restricting access to /proc ?
        does the following work when run as the zabbix user ?
        Code:
        cat /proc/net/dev
        Zabbix 3.0 Network Monitoring book

        Comment

        • rjanot
          Junior Member
          • Apr 2013
          • 4

          #5
          Hi richlv !

          That seems like a good track !

          Code:
          zabbix@pb-gate:/$ cat /proc/net/dev
          cat: /proc/net/dev: No such file or directory
          But with the root user :
          Code:
          [root@pb-gate:09:41:38 ~] cat /proc/net/dev
          Inter-|   Receive                                                |  Transmit
           face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
              lo: 16911298433 36807183    0    0    0     0          0         0 16911298433 36807183    0    0    0     0       0          0
           tunl0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
            sit0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
          dummy0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
            eth0: 54200078998 120437929    0    0    0     0          0    543606 23372734450 52023634    0    0    0     0       0          0
          ip6tnl0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
          So:
          - /proc directory is 0755 with root:root owner
          When I list the /proc folder as root user
          - /proc/net is a symlink to self/net
          - /proc/self is a symlink to "a number" which is changing everytime I do ls
          - /proc/net/dev is 0444 with root:root owner

          What command should I use to give acces rights to the zabbix user ?
          Is "chmod -R 755 /proc/net" enough secure ?

          Thanks !

          Comment

          • rjanot
            Junior Member
            • Apr 2013
            • 4

            #6
            In repsonse to richlv question, I've search, and I found that there is an apparmor installed. I tried to add a zabbix agent profile but no success.

            I've ps aux | grep apparmor, bot nothing is running, I don't know if it's normal.

            But no grsec nor selinux installed.

            I'm a bit lost. Hope you can help me

            Comment

            Working...