Ad Widget

Collapse

AS/400 Monitoring solutions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dknoxville
    Junior Member
    • Nov 2018
    • 4

    #106
    Hi,

    I am unable to use 0.0.0.0/0 as server settings in the configuration file. Anyone else having this issue ? As a result, even if I set the zabbix server IP in there and the local IP of the AS400 I still cannot connect with the agent and I get an error message like this: zabbix_get [30471]: Check access restrictions in Zabbix agent configuration when I try a simple commande like zabbix_get -k agent.ping -s [AS400IP]. If I put the IP address of the machine I use to access the web portal, everything is ok...

    Thanks,

    Comment

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

      #107
      Hi dknoxville,

      thank you for your information. It's very interesting (and unexpected for me) effect with the wrong DNS configuration.

      Regarding the "Server=" parameter, it does not support any subnets at the moment: it understands only IPv4 addresses or DNS names (if they are resolved in the DNS).
      Probably, I need to explain this moment in documentation (or modify a code to accept subnets also if it is necessary).

      However, if you don't need any restrictions, you can just comment this parameter out:
      Code:
      # Server=
      will allow connections from any source IP-address.
      Last edited by Kos; 03-12-2018, 09:56.

      Comment


      • dknoxville
        dknoxville commented
        Editing a comment
        Thanks, it's now resolved. I'm getting back information from the agent although only a few are coming in like agent version, system name and ping status. Do I need to change anything in the items definitions for them to start receiving data ?
        Thanks
    • Kos
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Aug 2015
      • 3404

      #108
      dknoxville, if you still have some problems now, you can discuss them here. All metrics supported by this agent emulator are described in documentation: some of them are just the same as a standard Zabbix Agents metrics (like agent.ping or system.uname), some are very similar but with some specificity adapted for this architecture (like eventlog[...], proc.num[...] or vfs.fs.*), but some are just new and specific only for this implementation (all as400.* metrics).

      I could recommend you debug needed metrics using a standard zabbix_get utility: you will see all information returned by the agent (the only exception is some metrics working in active-only mode, like eventlog[]).
      If you have some problems - describe them, please, in a more detail.

      If you are using the template downloaded from the share.zabbix.com, then, please, take into account that the most metrics use the active mode (disabled in your configuration). You can either enable an active mode (setting the "ServerActive=" parameter in config file), or modify the agent type from "Zabbix agent (active)" onto just "Zabbix agent" for each metric in the template.

      Comment

      • dknoxville
        Junior Member
        • Nov 2018
        • 4

        #109
        Hi Kos, thanks again for your support!! I went and activated the ServerActive parameter on the AS400. But nothing is picking up. When I send the zabbix_get function a value is correctly returned. Just to make, in the ServerActive parameter, I put the same IPs as for the Server parameter. Is this ok ?

        Comment

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

          #110
          Originally posted by dknoxville
          Just to make, in the ServerActive parameter, I put the same IPs as for the Server parameter. Is this ok ?
          Yes, it is correct if your Zabbix server uses the default TCP-port (10051). Otherwise it should be in format "<dns.name.or.ip.address>:<portNumber>", for example:
          Code:
          ServerActive=10.97.1.46:10051
          Of course, if you use the DNS-name, it should correctly be resolved by DNS into IP-address.

          The normal work of active check thread is reflected in Agent's log file at DebugLevel=4 like the following:
          Code:
              15:20181119:125437.557 agent #2 (zabbix.example.com) started [active checks #3]
          (look at the start of line: the thread number is "15" in this case, so we can search the following lines from this thead)
          Code:
              15:20181119:125437.557 in refreshActiveChecks(): host:zabbix.example.com, port:10051
              15:20181119:125437.557 in send() to server 'zabbix.example.com:10051'
          [...]
              15:20181119:125437.573  sending: to zabbix.example.com/192.168.xx.yy '{
          "request":"active checks",
          "host":"as400-test",
          "clock":1542624877,
          "ns":573000000
          }'
              15:20181119:125437.573 ZBXD header is OK, data length=62
              15:20181119:125437.573 End of send()
              15:20181119:125437.573  got [{"response":"failed","info":"host [as400-test] not monitored"}]
              15:20181119:125437.573 in parseListOfChecks(): '{"response":"failed","info":"host [as400-test] not monitored"}' [zabbix.example.com:10051]
              15:20181119:125437.573  no active checks: host [as400-test] not monitored
              15:20181119:125437.573 end of parseListOfChecks(): false
              15:20181119:125437.573  active check configuration update from [zabbix.example.com:10051] started to fail ()
              15:20181119:125437.573 end of refreshActiveChecks(): false
              15:20181119:125437.573 in processActiveChecks() server:'zabbix.example.com' port:10051
              15:20181119:125437.573 End of processActiveChecks()
          In this short example we can see the following:

          1) active checks has been configured in config file and Java thread "active checks" has really been started;
          2) it has been configured to connect to Zabbix-server with DNS-name "zabbix.example.com" and default port 10051;
          3) this DNS name successfully resolved to IP-address 192.168.xx.yy, agent sends the JSON requesting the list of active checks for host with the name "as400-test";
          4) communication with Zabbix-server is successful, server received this request and replies with another JSON;
          5) reply from the server in this particular case does mean "I know about this host; but it's not needed to monitor anything because this host is in disabled state";
          6) the list of active checks on the Agent remains empty, so the loop "processActiveChecks()" also does nothing and just returns.

          In real life (when the host is enabled) the server should return back the list of checks, and log file should contain a trace of processing of this list.

          By the way, the agent hostname must be the same (including the case of characters!) as the hostname in Zabbix web-interface. Otherwise (if the names mismatches) you can find messages like the following in the server's log:
          Code:
          cannot send list of active checks to "192.168.AAA.BBB": host [your.wrong.host.name] not found
          Hope, this helps

          Comment


          • dknoxville
            dknoxville commented
            Editing a comment
            That did it! The hostname was missing! Thanks!!!
        • denbad
          Junior Member
          • Jan 2019
          • 1

          #111
          Hi,
          Is there a vfs.file.contents metric or is expected in next relaese?

          Comment

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

            #112
            Originally posted by denbad
            Hi,
            Is there a vfs.file.contents metric or is expected in next relaese?
            Hi, denbad,
            unfortunately, answer is "No" for both questions: this metric is not supported currently and is not planned at while.

            Comment

            • sancho
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Mar 2015
              • 295

              #113
              Hello Kos
              For a few days, without any changes being made, several monitorizations with the key proc.num [,,, subsystem] with which I check the number of jobs in a subsystem, for no apparent reason change to "Not supported", but at the next monitoring they return to normal state.
              In the agent log I have observed the following error every time it has failed.
              Code:
              As400Metric.process () error: com.ibm.as400.access.AS400Exception: CPF9999 Function error. MCH3601 not supervised by QGYLJOBX in the statement * N, instruction X'0C2E '.
              Nobody has modified the java, and of the 19 monitoring I have with this key, it happens randomly, some fail and some do not.

              Could you help me?

              As always, thank you very much for everything.

              Sorry for my google english.
              Last edited by sancho; 17-10-2019, 18:49.

              Comment

              • essaycritics
                Junior Member
                • Jul 2019
                • 1

                #114
                Is the IBM AS/400 software dead now?

                Comment

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

                  #115
                  Hi everybody,
                  the version 0.7.7 uploaded now (link).
                  Mainly, bugs fixed and some optimizations added.

                  The list of changes:
                  • bug fix (could cause to untimely agent shutdown if communication errors to Zabbix Server);
                  • bug fix (unneeded communications to Zabbix Server for eventlog[...] metric processing);
                  • optimization in eventlog[...] metric processing: if the last processed message could not be found in a message queue (for example, due to selective manual removal of some messages), then the Agent doesn't re-send the entire message queue again;
                  • optimization in stopping active check threads;
                  • addition of “id” for each value in sending JSON according to Zabbix 4.0 protocol;
                  • optimization in "proc.num[,,,subsystem]" metric;
                  • catching cases when some job disappears during JobList processing – just ignore them (proc.num[…] and proc.cpu.util[…] metrics).
                  @sancho, try, please, this updated version. Probably, it could help with your problem.

                  Comment

                  • sancho
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Mar 2015
                    • 295

                    #116
                    Kos
                    Thank you very much, and as always, congratulations on your incredible work.

                    Comment

                    • sancho
                      Senior Member
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Mar 2015
                      • 295

                      #117
                      Hi Kos

                      Is there any way to monitor the number of files in a job queue?

                      Comment

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

                        #118
                        Originally posted by sancho
                        Hi Kos

                        Is there any way to monitor the number of files in a job queue?
                        Do you mean number of jobs in a job queue?
                        Currently the proc.num[...] metric allows to filter jobs by jobname, username, job state and subsystem name. It does not allow to filter by a job queue name.
                        API allows, however, to extract "the fully qualified integrated file system path name of the job queue that the job is currently on, or that the job was on if it is currently active" for every job.
                        Do you think that it's needed possibility to have an additional parameter for a proc.num[...] metric for filtering by a job queue name also?

                        Comment

                        • sancho
                          Senior Member
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Mar 2015
                          • 295

                          #119
                          Hi Kos

                          proc.num was the first thing I tried.

                          I explain the problem,

                          I need, if possible, to obtain the number of jobs in a jobq, to test I am monitoring another jobq that usually has jobs:

                          In AS400 when working with the jobq with the wrkjobq qgpl/grpalm03 command It is noted that there are 14 jobs inside.

                          Click image for larger version  Name:	wrkjobq.jpg Views:	0 Size:	113.4 KB ID:	388245

                          Click image for larger version  Name:	wrkjobq2.jpg Views:	0 Size:	83.2 KB ID:	388246

                          If I create the item:
                          proc.num [,,"*SCD",GRPALM03]

                          It gives the following error:
                          com.ibm.as400.access.AS400Exception: GUI0052 * SCD is not valid for the active state. Without the * also gives error.

                          If I create the item:
                          proc.num[F_LLEGADA,EVARGAS,,GRPALM03]
                          No error, but the value that itme gets is 0

                          I am doing something wrong??

                          With your previous question

                          Do you think that it's needed possibility to have an additional parameter for a proc.num[...] metric for filtering by a job queue name also?
                          Sorry, i don't know if you are evaluating adding a new parameter to the item, or do you think you don't need to add it?

                          As always, thanks for your time and your knowledge.
                          Last edited by sancho; 18-10-2019, 14:29.

                          Comment

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

                            #120
                            Hi sancho,

                            it seems that your jobs in the GRPALM03 subsystem are not in active state yet ("SCD" status on the job queue does mean: "This job will run as scheduled").

                            The proc.num[] metric uses the JobList class in API; so it allows to use as 3-rd parameter one of the following string constants (case-insensitive):
                            • *ACTIVE
                            • *JOBQ
                            • *OUTQ
                            • RUN (union of *ACTIVE and *JOBQ)
                            • ALL (union of *ACTIVE, *JOBQ and *OUTQ)
                            • any 4-character abbreviation for active job status in the table here.
                            So, when you try to use "*SCD" or just "SCD", it fails as it is not a valid state for an active job status.

                            Unfortunately, I'm not very good specialist in AS/400 systems; but I
                            supposed that the last case (proc.num[F_LLEGADA,EVARGAS,,GRPALM03], without 3-rd parameter at all) should work.
                            If you have only these 14 jobs in this subsystem, you can try to set the subsystem argument only:
                            proc.num[,,,GRPALM03]
                            Does it also return zero?

                            If yes, then, probably, we could not use this API "as is" (without modifications) for this purpose. Probably, it could be possible if we can specify a fully-qualified integrated file system name for a server job queue for this API call; but it will require an additional parameter for this metric.

                            Comment

                            Working...