Ad Widget

Collapse

Zabbix agent problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mattttt
    Junior Member
    • May 2023
    • 9

    #1

    Zabbix agent problems

    Hello,

    I have a zabbix server which is up and running and am working on getting an agent going on a mysql server, but running into an issue. The agent appears to be running:

    zabbix-agent.service - Zabbix Monitor Agent
    Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
    Active: active (running)​
    In the agentd log, i keep seeing this: failed to accept an incoming connection: connection from "xxxxx" rejected, allowed hosts: "127.0.0.1"

    When I read up on the issue I am directed to go to the agent conf file, but it does not exist in any of the locations I see it referenced. I am pretty new to Zabbix.
  • roy_li
    Junior Member
    • Nov 2022
    • 10

    #2
    You should edit the zabbix_agentd.conf file and change the value of the Server parameter to your zabbix server address.

    If you install agent from packages, your configuration file is located in /etc/zabbix/.

    If you install it from sources, your configuration file is located in your install path.

    Comment

    • mattttt
      Junior Member
      • May 2023
      • 9

      #3
      I think something is wrong with how this installed. I installed from the instructions at https://www.zabbix.com/documentation...t_installation

      I found the zabbix agent conf in the /etc directory and updated it, so the agent was communicating with the server. However when I try to set up mysql monitoring it does not work, I think because there is already a my.cnf in the /etc folder. Why would these not have installed to the /etc/zabbix folder during setup?​

      Comment

      • mattttt
        Junior Member
        • May 2023
        • 9

        #4
        Also if I move the config files into the /etc/zabbix directory the agent fails.

        Comment

        • mattttt
          Junior Member
          • May 2023
          • 9

          #5
          Dug around some more and found that my.cnf in /var/lib/zabbix. I updated with the credentials there but I now have the issue of "MySQL: Failed to fetch info data (or no data for 30m)​"

          Comment

          • mattttt
            Junior Member
            • May 2023
            • 9

            #6
            This is what I see in the agentd log. I did the whole setup of adding the zabbix user to the db and granting privileges, and setting up the my.cnf with the credentials

            18821:20230519:110413.788 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reaso n:0]. Exiting ...
            18821:20230519:110413.797 Zabbix Agent stopped. Zabbix 6.0.16 (revision a90e18c0b6e).
            23049:20230519:110413.867 Starting Zabbix Agent [Zabbix server]. Zabbix 6.0.16 (revision a90e18c0b6e).
            23049:20230519:110413.873 **** Enabled features ****
            23049:20230519:110413.879 IPv6 support: YES
            23049:20230519:110413.886 TLS support: YES
            23049:20230519:110413.891 **************************
            23049:20230519:110413.897 using configuration file: /etc/zabbix_agentd.conf
            23049:20230519:110413.905 agent #0 started [main process]
            23050:20230519:110413.913 agent Home started [collector]
            23051:20230519:110413.919 agent Forum started[listener #1]
            23052:20230519:110413.925 agent #3 started[listener #2]
            23053:20230519:110413.932 agent #4 started[listener #3]
            23054:20230519:110413.940 agent #5 started [active checks #1]​

            Comment

            • mattttt
              Junior Member
              • May 2023
              • 9

              #7
              I am seeing this in the mysql log: [Warning] Access denied for user 'zbx_monitor'@'localhost' (using password: YES)

              I have created the user and granted it access. I can use that credential to connect using my query tool. However I notice if I am on the server and I mysql -u zbx_monitor -p and put the password I get access denied. But if I use no password it allows it?

              Comment

              Working...