Ad Widget

Collapse

AS/400 Monitoring solutions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kos
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2015
    • 3404

    #31
    Version 0.6.0 published here.

    Main changes:
    • Connections to AS/400 are permanent now (contrary to "noisy" shirt-living connections before);
    • Auto-reconnect to AS/400 is implemented;
    • If some active check fails, this failed result is returned to Zabbix server after first reiteration only; the first fail is ignored now;
    • Some small optimizations;
    • Version of IBM Toolbox for Java API is written to log file during startup;
    • Start/stop of this program as a AS/400 subsystem described in documentation.


    I see that there was about 20 downloads of v0.5.x.
    Unfortunately, I have no any feedback at all :-(
    Did anybody tried it really? Is it useful for anyone besides me?

    Comment

    • RohrbaGe
      Senior Member
      • Aug 2005
      • 167

      #32
      AS400 Monitoring JAVA

      Hi Kos,

      I tried today, was too busy before.
      I like the idea, and it sounds much better than other solutions.

      But I got an error message 'ZABBIX_AGE' not vaild

      I did not found in the zabbix_agentd conf file so probably it´s in the .jar files somewhere.

      Do you have any idea?
      It´s a German AS400

      Regards
      Gerald



      Auswahl oder Befehl
      ===> sbmjob cmd(JAVA Class ('/home/ZABBIX/ZabbixAgent.jar) PARM('/home/ZABBIX/z
      abbix_agentd.conf')) JOB ZBXSVC JOBQ(QSYS/QSYSNOMAX) USER(ZABBIX)
      F3=Verlassen F4=Bedienerführung F9=Auffinden F12=Abbrechen
      F13=Unterstützende Informationen
      Zeichen im Qualifikationsmerkmalsanfang 'ZABBIX_AGE' ungültig. +

      Comment

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

        #33
        Hello Gerald,

        thank you for a feedback.
        Unfortunately, I'm out of office this week. I'll try to response you next week, when I'll back to work.
        --
        Constantin

        Comment

        • RohrbaGe
          Senior Member
          • Aug 2005
          • 167

          #34
          Kos,

          thanks.

          I found a typo.
          I can start, no error, but I think it stops immediately.

          I´m no i5 expert....

          How I can get some details what happens.


          Regards

          Gerald

          Comment

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

            #35
            Hello Gerald,

            unfortunately, I'm not the i5 expert too ;-)

            However, in general:
            This Java program first of all tries to process the config file during initialization, in particular - the "LogFile=" parameter (all parameter names are case-sensitive, and there should be no spaces near the "=" character).
            If this stage of initialization is successful, then all subsequent bad events are written to this log file.
            Check, please, if the log file was created at all. At least, the agent should write there the agent version and Java version; here is the example of successful start/stop (at the default DebugLevel=3):
            Code:
                10:20170109:171924.799 Starting Zabbix Agent v0.6.0
                10:20170109:171924.814 using configuration file: zabbix_agentd.conf
                10:20170109:171924.814 Oracle Corporation Java version "1.8.0_20"
                10:20170109:171924.814  Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
                10:20170109:171924.814  Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
                10:20170109:171924.814  Open Source Software, JTOpen 9.1, codebase 5770-SS1 V7R3M0.00 built=20160705 @RF
                13:20170109:171924.845 agent #1 started [collector]
                14:20170109:171924.845 agent #2 (zabbix.mycompany.com) started [active checks #3]
                15:20170109:171924.845 agent #3 started[listener #1]
                16:20170109:171924.845 agent #4 started[listener #2]
                17:20170109:171924.845 agent #5 started[listener #3]
                17:20170109:171934.100 agent #5 stopped[listener #3]
                14:20170109:171934.559 agent #2 (zabbix.mycompany.com) stopped [active checks #3]
                15:20170109:171936.099 agent #3 stopped[listener #1]
                16:20170109:171936.100 agent #4 stopped[listener #2]
                13:20170109:171936.117 agent #1 stopped [collector]
                 1:20170109:171936.133 Zabbix Agent stopped. v0.6.0
            If there is no log file, then you need, probably, look at the i5 job spool file for an additional info (it could be Java environment initialization problem, jt400.jar or json-simple-1.1.1.jar not found, no write permissions for log file creation or something else).

            Comment

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

              #36
              1) I've updated version (currently 0.6.1) - bug fixed. The previous versions did not close the list handle after API calls, it caused to message "Tried to go larger than storage limit for object" in the job log after some time (about 10 days of continuous work). The resources should be released correctly now.

              2) Gerald, my colleague is reminding me that it's possible to start a process in i5 system interactively. The full command
              Code:
              SBMJOB CMD(...) ...
              starts a process in a background. You can use only part in parentheses of "CMD" parameter to start the same process interactively. This process will be alive till the end of your current session (or until process completes). So, as troubleshooting step, you can try the following:
              Code:
              JAVA Class ('/home/ZABBIX/ZabbixAgent.jar) PARM('/home/ZABBIX/zabbix_agentd.conf')
              It should start the Java process in a foreground. At least, you will see any errors if they are occuring during Java environment or my program initialization.
              If it starts successfully, then you can stop it asking "agent.exit" metric by zabbix_get utility (for example, just from Zabbix server), or just closing your current session.

              Comment

              • RohrbaGe
                Senior Member
                • Aug 2005
                • 167

                #37
                Kos,

                I found the time for the next try. Still no full success, but ...

                Message is in german, Exception in Thread, none valid superior version is written in the top.

                At the bottom the output for the AS400 Java version, I guess this is the problem.
                I´ve created a user ZABBIX with the own home share, but this user was not able to start JAVA, so I did with qsecofr.

                In the zabbix_agentdd.conf I chnaged the path to:
                LogFile = /home/ZABBIX/agentd/zabbix_agentd.log
                I´m not sure if that is right.

                There is folder /home/ZABBIX/agentd and zabbix user and qsecofr do have full rights, no log file is created, probably because the java program does not started even.



                Regards

                Gerald


                -----------------------------

                Ausnahmebedingung in Thread "main"# START NON-TRANSLATABLEjava.lang.Unsupport
                edClassVersionError: JVMCFRE003 Ungültige übergeordnete Version; Klasse=as400
                /thread/ZabbixAgent, Offset=6
                at java.lang.ClassLoader.defineClassImpl(Native Method)
                at java.lang.ClassLoader.defineClass(ClassLoader.java :286)
                at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java
                :74)
                at java.net.URLClassLoader.defineClass(URLClassLoader .java:538)
                at java.net.URLClassLoader.defineClass(URLClassLoader .java:449)
                at java.net.URLClassLoader.access$300(URLClassLoader. java:77)
                at java.net.URLClassLoader$ClassFinder.run(URLClassLo ader.java:1041)
                at java.security.AccessController.doPrivileged(Access Controller.java:
                448)
                at java.net.URLClassLoader.findClass(URLClassLoader.j ava:427)


                ###########################################

                java version "1.6.0"
                Java(TM) SE Runtime Environment (build pap3260sr16fp15-20151106_01(SR16 FP15)
                )
                IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 OS/400 ppc-32 jvmap3260sr16fp15-20
                151029_01 (JIT enabled, AOT enabled)
                J9VM - 20151020_272943
                JIT - r9_20151019_103450
                GC - GA24_Java6_SR16_20151020_1627_B272943)
                JCL - 20151105_01
                Java-Programm beendet

                Comment

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

                  #38
                  Gerald,

                  Readme and the description both have the following warning:
                  This Jar-file has been compiled using JDK 1.8, but for running under JRE 1.7. So, you need minimum Java version 1.7.
                  It uses some features that became available in Java 1.7, so it will not work under JRE 1.6 and older.

                  JRE 1.7 is the default version for IBM i v7.2; however, it could be used without problem with the os v7.1 also. For example, we use IBM i v7.1; but successfully tested this Zabbix agent emulator with both Java versions 1.7.1 and 1.8.0 (the latter is the default for IBM i v7.3).
                  Last edited by Kos; 30-01-2017, 15:33.

                  Comment

                  • RohrbaGe
                    Senior Member
                    • Aug 2005
                    • 167

                    #39
                    Kos,

                    I think we can upgrade on the i5 the Java.

                    But at first I will try from another machine.

                    I need to fined one with X11 enabled or deskop screen, or do I have a chance from console only?


                    Regards
                    Gerald

                    Comment

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

                      #40
                      Gerald,

                      yes, you can use the other machine with Java 7 or Java 8 to start this Zabbix agent emulator and connect to i5 system via network. It does not use graphic, so X11 is not necessary; a console access is enough. You need, however, some additional JAR-files (see documentation for details).

                      Comment

                      • RohrbaGe
                        Senior Member
                        • Aug 2005
                        • 167

                        #41
                        Kos,

                        I have tried now from another Ubuntu machine:

                        This are the files in the folder.
                        root@DEPCD001:/GRprog/as400# ls
                        json_simple-1.1.jar zabbix_agentd.conf ZabbixAgent.jar
                        jt400.jar zabbix_agentd.log

                        This message I get when I start:
                        root@DEPCD001:/GRprog/as400# java -jar ZabbixAgent.jar /GRprog/as400/zabbix_agentd.conf
                        Exception in thread "main" java.lang.NoClassDefFoundError: org/json/simple/parser/ParseException
                        at as400.thread.ZabbixAgent.main(ZabbixAgent.java:62)
                        Caused by: java.lang.ClassNotFoundException: org.json.simple.parser.ParseException
                        at java.net.URLClassLoader.findClass(URLClassLoader.j ava:381)
                        at java.lang.ClassLoader.loadClass(ClassLoader.java:4 24)
                        at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:331)
                        at java.lang.ClassLoader.loadClass(ClassLoader.java:3 57)
                        ... 1 more

                        Do I have to call in a different way? Do I have to tell somehow tp use the jt400.jar?
                        Where can I get more detailed error descriptions?

                        Regards

                        Gerald

                        Comment

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

                          #42
                          Gerald,

                          documentation tells:
                          You need also necessary libraries (jt400.jar and json-simple-1.1.1.jar) in one of two places: either in the same directory as ZabbixAgent.jar file or in the directory for JRE's system libraries (${JAVA_HOME}/lib/ext/).
                          Evidently, you have no file json-simple-1.1.1.jar. In your case the appropriate file has different name (json_simple-1.1.jar).

                          You can either rename this file into the name expected, or to start Java class directly using command line like the following:

                          Code:
                          java -classpath "json_simple-1.1.jar:jt400.jar:ZabbixAgent.jar" as400.thread.ZabbixAgent zabbix_agentd.conf

                          Comment

                          • RohrbaGe
                            Senior Member
                            • Aug 2005
                            • 167

                            #43
                            Kos,

                            yes, now I got it working.
                            I will do some evaluation for the items, but in general it works now.

                            Thanks for your help.

                            Comment

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

                              #44
                              Gerald,

                              I'm glad to hear that.
                              It will be great to obtain some feedback about your experience ;-)

                              Comment

                              • RohrbaGe
                                Senior Member
                                • Aug 2005
                                • 167

                                #45
                                Kos,

                                I have now several items setup and working.

                                I looking simple thinks like outquesize, subsystems activity and
                                some cpu utilizations. That all works fine.
                                I found some strange negative values for CPU utilization, but in general it seems to be ok. I will try to find where the negative values, (very seldom)
                                are coming from.

                                Do I have a chance to monitor I/O for the disk somehow?

                                As the machine has only 20% CPU load I want to check if IO makes it busy sometimes.
                                The ERP system, Client Server architcture shows a slow behavoiur and I hope to find somehow the bottleneck.

                                Regards

                                Gerald

                                Comment

                                Working...