Ad Widget

Collapse

Cannot monitor macbook? (tried a few things already)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marianogedisman
    Member
    • Oct 2021
    • 78

    #1

    Cannot monitor macbook? (tried a few things already)

    Hello everyone! I’m having some particular trouble getting my Zabbix server to read my macbook (for the sake of testing).
    I have Zabbix 6.0 LTS and running non encryption agent on my macbook. Ports are open and all seems fine network-wise.

    * I made sure to create the host/hostame same as my laptop’s hostname (same on zabbix_agentd.conf)

    * Made sure all servers are configured correctly on zabbix_agentd.conf


    * Latest zabbix_agentd.log on macbook reads:
    Code:
    65174:20220226:014210.715 zbx_setproctitle() title:'collector [idle 1 sec]'
    
    65178:20220226:014210.715 In send_buffer() host:’(host ip here)' port:10051 entries:0/100
    
    65178:20220226:014210.715 End of send_buffer():SUCCEED
    
    65178:20220226:014210.716 zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
    
    65178:20220226:014211.789 In send_buffer() host:'(host ip here)' port:10051 entries:0/100
    
    65178:20220226:014211.790 End of send_buffer():SUCCEED
    
    65178:20220226:014211.792 zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
    
    65174:20220226:014211.792 zbx_setproctitle() title:'collector [processing data]'
    
    65174:20220226:014211.793 In update_cpustats()
    
    65174:20220226:014211.793 End of update_cpustats()
    
    65174:20220226:014211.794 zbx_setproctitle() title:'collector [idle 1 sec]'
    * zabbix_agentd-err.log on macbook is emtpy. Debug level set to 4.

    * fping is in correct directory as per zabbix-server.conf



    What else am I missing? I’m at loss.Logs on Zabbix server side seem to be ok.

    Any help is greatly appreciated!


  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    So you've created a "host" entry for your Macbook within Zabbix, so that the Zabbix server knows how to contact the host.

    Have you created any items that should be collected from your Macbook? You can either create items one-by-one, to tailor things exactly for what you want, or you can find a pre-defined template that either collects some items or uses discovery to find items to gather. Be sure you understand the difference between "active" and "passive" item collection with the agent/agent2 too.

    Items are the datapoints (things like 1 minute load average is 0.91, or /Applications volume is 95.3% full) that get collected periodically (e.g. every minute, every 5 minutes, or whatever),

    Triggers are the thresholds that contain the logic you want to use to decide if there's a problem.

    Comment


    • marianogedisman
      marianogedisman commented
      Editing a comment
      Hello tim.mooney! Thanks for your reply! And sorry for missing some more info. Yes, I have the item created on my Zabbix server, with the same hostname as the macbook, and set as agent with my home’s public ip address: port

      Weird thing is, I am not seeing any errors on logs on agent side.
  • marianogedisman
    Member
    • Oct 2021
    • 78

    #3
    Welp, got some progress(?), I forced the port on the agent config file on the macbook, and now I get a ZBX in red status (before it was grey, see image below).

    Only problem is I get
    Code:
    Get value from agent failed: cannot connect to [[ip address]:10050]: [4] Interrupted system call
    error. I will google this and see what I can find, also will look into my Debian VM FW to see what could be going on.

    Click image for larger version  Name:	z1.png Views:	0 Size:	49.0 KB ID:	440516


    EDIT: I’m starting to think it´s my home router not allowing the traffic. Although I’ve forwarded the ports correctly (cannot open ports), but i’m at loss at why the agent wouldn’t connect to the server.


    EDIT2: Yep, that seems to be the case. Argh, stupid router I mean, I’ve forwarded the ports, what else does it want!?

    Code:
    canned at 2022-02-26 19:08:11 UTC for 3s
    
    
    
    
    PORT STATE SERVICE REASON
    
    10050/tcp filtered zabbix-agent no-response
    
    10051/tcp filtered zabbix-trapper no-response
    Last edited by marianogedisman; 26-02-2022, 21:13.

    Comment

    • Noobz
      Senior Member
      • Jun 2020
      • 105

      #4
      If this is all at home, why is the traffic being routed through a firewall at all unless you've got production and development networks perhaps?

      Comment


      • marianogedisman
        marianogedisman commented
        Editing a comment
        Hello Noobz! Thanks for your message. I’m sorry, I am not following. By "through a firewall", what do you mean precisely?
    • Noobz
      Senior Member
      • Jun 2020
      • 105

      #5
      Well, on a given subnet, such as your home LAN, there is no firewall, no port forwarding, no routing - All those things happen between networks, not at layer 2, on the same broadcast domain.

      If the MacBook and Zabbix VM are on the same network, traffic between them should never hit your router's firewall.

      Maybe I have misinterpreted the situation, seeing as you have resolved the issue, I assume this is the case.

      Comment

      • marianogedisman
        Member
        • Oct 2021
        • 78

        #6
        Hello Noobz ! Thanks again for replying.
        You did not misinterpret, I believe I explained my issue incorrectly (or at least not in full detail), My Zabbix server is running on a cloud VM.

        Again, sorry for missing this!

        I didn’t resolve the issue however, but I strongly believe it’s network related. I am trying to change my router at the moment, and see if that fixes things.

        I might come back to this thread in a long long while afterwards, in case I need further support. If I get it resolved by changing the router, I will also let you know.

        Thanks again for chipping in guys!

        Comment

        Working...