Ad Widget

Collapse

Reading logfiles of VM or LXC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Seqway
    Junior Member
    • Jan 2022
    • 9

    #1

    Reading logfiles of VM or LXC

    Hello,
    i have a strange problem.
    I have a proxmox server running with several VMs and CTs. I integrated these VMs / Cts in zabbix via zabbix agent succesfully. CPU etc. is coming fine in the databse.

    I have also items and triggers as template for LOGs.

    Now the strange thing is coming:
    If i want to open the /var/log/syslog it seems to be that it opens the syslog file of my MAIN PROXMOX PVE SERVER !!! And not from my VM or CT. Is that possible or do i do something wrong ?

    The expression in my item is:
    HTML Code:
    log[/var/log/syslog,error,,,,,]
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    You have Zabbix server and Zabbix agent. An agent collects information from the host it runs on. You need to set up this item for the agent running on the desired host.

    Comment

    • Seqway
      Junior Member
      • Jan 2022
      • 9

      #3
      Originally posted by dimir
      You have Zabbix server and Zabbix agent. An agent collects information from the host it runs on. You need to set up this item for the agent running on the desired host.
      Yes i know that.
      I have agent running on my proxmox server and agent runing on my Container (lxc)

      When i want to check now thelogile from my CONTAINER then it shows me the file from Proxmox-Server

      Both interfaces are correctly configured with different IPs according to proxmox server and proxmox lxc container.

      So why i can't read the files from the lxc container ?

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        You don't use proxy right? If yes, both agents should have ServerActive= configuration parameter set to Zabbix server IP. Also, you might want to check the log files of the server and related agent. There might be errors about failure to request or send the list of active checks of the agent.

        Comment

        Working...