Ad Widget

Collapse

Zabbix agent emulator for as400 system

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Genya94
    Junior Member
    • Nov 2022
    • 3

    #1

    Zabbix agent emulator for as400 system

    Hi,

    My team is starting a transformation from an old monitoring system to a Zabbix environment and part of the system we monitor is an AS400.
    I found this link to the Zabbix community - https://www.zabbix.com/integrations/as400
    Does it work with the latest Zabbix version 6.4? and is there maybe a guide on how to implement this kind of agent emulator?
    Any help will do as we are just starting with Zabbix.
    Thank you in advance!
  • Kos
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2015
    • 3404

    #2
    Hi, Genya94!

    I hope, this link will help you. As the author of this project, I monitor that forum thread and try to reply in a reasonable time

    Yes, this agent emulator should work with Zabbix v6.4, too. The only issue is that it will not reflect the status of Active mode Agent in the "Availability" column on some screens like "Monitoring" -> "Hosts" (link). The previous versions of Zabbix did not monitor the availability of active agents at all; this feature has been added since v6.2 (extending the existing protocol used by agents in an active mode). However, the as400 agent emulator still does not implement this protocol extension due to lack of needed information. However, this is just a cosmetic issue - all its existing functionality should work OK.​
    Last edited by Kos; 17-11-2023, 17:59.

    Comment


    • Genya94
      Genya94 commented
      Editing a comment
      Hi @Kos,

      First of all thank you for your comment and thank you for that project.

      Somehow I'm missed the readme.pdf file so I didn't fully understand how to make the agent emulator work but now it seems really simple.
      I just have one question, in the "Start of program" section under the second case of connection you wrote that there's need to be a network access between the server the agent is on and the as400 system, what network access you meant? SSH port 22? And what credential I should supply in their conf file? The password for the as400?

      Thank again for your help!
  • Kos
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2015
    • 3404

    #3
    Hi!
    I just have one question, in the "Start of program" section under the second case of connection you wrote that there's need to be a network access between the server the agent is on and the as400 system, what network access you meant? SSH port 22? And what credential I should supply in their conf file? The password for the as400?
    The AS/400 clients (including the IBM Toolbox library) use some number of network ports to connect to different services (see the as400.service[service] metric and the isConnected(service) method used to implement this check). Probably, it's a good idea to find the list of ports used by these services by default, and include it in the README file, too.
    Credentials - yes, the username and password of the user profile on the as400.

    Update: see here for info about the network ports (link).
    Last edited by Kos; 21-11-2023, 10:31.

    Comment

    • wuhaohust
      Junior Member
      • Jan 2025
      • 10

      #4
      Originally posted by Kos
      Hi!

      The AS/400 clients (including the IBM Toolbox library) use some number of network ports to connect to different services (see the as400.service[service] metric and the isConnected(service) method used to implement this check). Probably, it's a good idea to find the list of ports used by these services by default, and include it in the README file, too.
      Credentials - yes, the username and password of the user profile on the as400.

      Update: see here for info about the network ports (link).
      Kos, may I know what's the required privilege for the user which used for as400 monitoring ?

      Comment

      • Kos
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Aug 2015
        • 3404

        #5
        Originally posted by wuhaohust
        Kos, may I know what's the required privilege for the user which used for as400 monitoring ?
        You need a user on as400 system (either to start the Java process for local agent running, or to connect as this user for remote mode).
        This user does not require any special privileges in default setup; but it may be necessary to assign some privileges (like *JOBCTL for job monitoring) if you performed hardening of your OS.

        Comment


        • wuhaohust
          wuhaohust commented
          Editing a comment
          Kos thanks, we use the agent and successfully collected the data. If we need some other metrics (like disk busy rate, asp overflow), how can we get that ... I am not familiar with java....really appreciate if you can help with this
      • wuhaohust
        Junior Member
        • Jan 2025
        • 10

        #6
        Originally posted by Kos
        You need a user on as400 system (either to start the Java process for local agent running, or to connect as this user for remote mode).
        This user does not require any special privileges in default setup; but it may be necessary to assign some privileges (like *JOBCTL for job monitoring) if you performed hardening of your OS.
        Now we successfully run the agent on our as400 devices, and we also added the function to calculate the disk busy with (total sample count - non busysample count)/total sample count ,everything is working fine. But on 1 device, we received an alert "zabbix agent(active mode) is unreachable ", agent is still running and in the logs we can see below messages,it looks like the agent still collecting the info and just failed to upload the data? May I know if there is any retry Mechanism to avoid such issue ?
        70:20250718:211938.921 active check data upload to [xx.xx.xxx.xxx:10051] started to fail
        69:20250719:000004.188 Procstat.updateJobinfoList() error: com.ibm.as400.access.AS400Exception: CPF3C53 Job 254470/QSYS/QYMEARCPMA not found.
        69:20250719:012912.656 Procstat.updateJobinfoList() error: com.ibm.as400.access.AS400Exception: CPF3C53 Job 254881/QUSER/QZSOSIGN not found.
        69:20250719:014939.330 Procstat.updateJobinfoList() error: com.ibm.as400.access.AS400Exception: CPF3C53 Job 254976/QUSER/QZSOSIGN not found.

        Kos

        Comment

        • Kos
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Aug 2015
          • 3404

          #7
          Originally posted by wuhaohust
          Now we successfully run the agent on our as400 devices, and we also added the function to calculate the disk busy with (total sample count - non busysample count)/total sample count ,everything is working fine. But on 1 device, we received an alert "zabbix agent(active mode) is unreachable ", agent is still running and in the logs we can see below messages,it looks like the agent still collecting the info and just failed to upload the data? May I know if there is any retry Mechanism to avoid such issue ?

          Code:
          70:20250718:211938.921 active check data upload to [xx.xx.xxx.xxx:10051] started to fail
          69:20250719:000004.188 Procstat.updateJobinfoList() error: com.ibm.as400.access.AS400Exception: CPF3C53 Job 254470/QSYS/QYMEARCPMA not found.
          69:20250719:012912.656 Procstat.updateJobinfoList() error: com.ibm.as400.access.AS400Exception: CPF3C53 Job 254881/QUSER/QZSOSIGN not found.
          69:20250719:014939.330 Procstat.updateJobinfoList() error: com.ibm.as400.access.AS400Exception: CPF3C53 Job 254976/QUSER/QZSOSIGN not found.
          Kos
          Hi @wuhaohust,

          first of all, insure that you are using the last available version (0.7.9 at the moment, see here). The Agent writes the version number to the log file during startup, you can check it.

          Yes, the Agent has a retry mechanism to send any information collected during unavailability period.
          However, your quoted messages (besides the first line) don't relate to the Agent' availability; they are just warnings that some jobs don't exist anymore.
          You need to investigate why there is a communication issue. If the passive mode checks work OK, but the active mode checks fail (additionally, on one specific host only), then it is, most probably, a configuration problem. Check the following moments, please:
          • communications from the Agent to Zabbix Server (IPv4, tcp port 10051) are not blocked by any firewall;
          • parameter "ServerActive=" in the Agent's configuration file contains the correct IP address or DNS name of the Zabbix Server;
          • parameter "Hostname=" in the Agent's configuration file contains the correct name of Zabbix host. It must have exactly the same value as the "technical" ("Host name" field, not "Visible name) name of this host in a Zabbix web interface.
          I hope, this helps.

          Comment


          • wuhaohust
            wuhaohust commented
            Editing a comment
            thanks for your reply. Yes, it's actually a connection issue, after upgrade the san switch , network connection changed and the 10051 is blocked, it's not a agent issue
        • wuhaohust
          Junior Member
          • Jan 2025
          • 10

          #8
          Originally posted by Kos
          Hi @wuhaohust,

          first of all, insure that you are using the last available version (0.7.9 at the moment, see here). The Agent writes the version number to the log file during startup, you can check it.

          Yes, the Agent has a retry mechanism to send any information collected during unavailability period.
          However, your quoted messages (besides the first line) don't relate to the Agent' availability; they are just warnings that some jobs don't exist anymore.
          You need to investigate why there is a communication issue. If the passive mode checks work OK, but the active mode checks fail (additionally, on one specific host only), then it is, most probably, a configuration problem. Check the following moments, please:
          • communications from the Agent to Zabbix Server (IPv4, tcp port 10051) are not blocked by any firewall;
          • parameter "ServerActive=" in the Agent's configuration file contains the correct IP address or DNS name of the Zabbix Server;
          • parameter "Hostname=" in the Agent's configuration file contains the correct name of Zabbix host. It must have exactly the same value as the "technical" ("Host name" field, not "Visible name) name of this host in a Zabbix web interface.
          I hope, this helps.
          Kos is it possible to specify which IP to be used for active check? we have multi IPs on as400 and only 1 IP connection is allowed , now the connection is from another IP and the connection is blocked

          Comment

          • Kos
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Aug 2015
            • 3404

            #9
            Originally posted by wuhaohust
            Kos is it possible to specify which IP to be used for active check? we have multi IPs on as400 and only 1 IP connection is allowed , now the connection is from another IP and the connection is blocked
            wuhaohust , good question.
            Actually, Zabbix Agent recognizes the "SourceIP=" parameter in the config file, but ignores it
            So, unfortunately, at the moment - the honest answer is: "no, it's impossible right now".
            However, it is a good point for me to implement this feature in some next version (I don't think it is too difficult).

            Comment

            • jorven16
              Junior Member
              • Jul 2025
              • 1

              #10
              Yes, the AS400 integration works with Zabbix 6.4. You can find guides on the Zabbix community page and forums. Start by following the steps in the link you shared and ask in the community if you need help. Good luck!

              Comment

              Working...