Ad Widget

Collapse

AS/400 Monitoring solutions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yowa
    Junior Member
    • Nov 2014
    • 5

    #1

    AS/400 Monitoring solutions

    Hi guys, I already apologize for my poor english...

    So, we are actually running a Zabbix 2.4 on Debian 7, what we want to do is to monitor our AS/400 / iSeries,
    and more precisly Actives Processes (Number, Job Name ...) and also Job Queue Statistics (Numbers, Job type, Job status).

    So i searched for a while on internet and i didnt really found any viable solution. I thought about doing it
    with SNMP, but i saw on many forums that a snmpwalk request may not return that much of informations.

    Because we want some specifics informations from our AS/400 and not just default ones, i searched for MIBS, and the only thing
    i had found was this : http://www.comtekservices.com/Docume...erveras400.pdf

    To be honest, i'm not really experienced in MIBs operation and i don't really know if i can just use this MIB file, save it on my
    Zabbix Server, in my mibs directory, and it will magically work when i will ask the AS/400 (which will be on his side configured for SNMP) ? I wanted to
    have your thoughts about that one ?

    It may be possible to do that monitoring (Job Queue stats, Active Process) otherwise (is it ?), but i didn't find anything else, so be free to share other
    ways to do it (with or without SNMP).

    I hope i'm not too confused with my explanations,


    Thank you in advance,

    PS : I am available if you need more information about my situation..
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    This is an older template that a Zabbix member created. Probably will not import correctly into your version of Zabbix, but it may be worth looking at:

    Comment

    • Yowa
      Junior Member
      • Nov 2014
      • 5

      #3
      Sorry for the late answer,

      I had a look at your link some times ago, but this template is not providing datas that i want.
      In fact my problem is more about how could i get jobs status etc. Apparently if i want to do it with SNMP my only solutions are prices
      solutions... because standards MIBs doesnt provide those infos.

      But there is a Nagios plugin (http://exchange.nagios.org/directory..._as400/details) who
      is capable of retrieving datas that i need.

      So my question is, did someone managed to have this Nagios plugin working into a Zabbix Server ? if not, does it look possible and is my question legite ?

      Regards..

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        Silly question - Do you like programming? Could you write your own script?

        If the answer - NO, I cannot say anything.
        If the answer - YES, it's a completely different situation.
        In Nagios plugin source code you can find the command which are sending to AS-400 server and the typical answers, which are converting to Nagios status codes.

        If you can do it on your lovely language (php, c#, basic) - you are good!
        If not - sorry, not many people have the same situation as you (Zabbix + AS-400 + request for monitoring of processes)

        PS The fast, simple and wrong solution - use "SSH agent" type of items for Zabbix. You can write a small script in the field "Executed script" and collect the information which you need.
        Sincerely yours,
        Aleksey

        Comment

        • mbsit
          Senior Member
          • Sep 2012
          • 130

          #5
          Hi to All,
          As I have the same problem right now, I checked the nagios plugin and this plug-in uses telnet (port 23) connection to send commands.
          The same we can do in Zabbix using Telnet Agent.

          Ask me for about 1 mouth I will have the solution, because I have order to do something like that in one of my customer.

          Bests,
          Grzegorz
          Pozdrawiam
          Grzegorz Grabowski
          ____
          Wdrożenia, szkolenia, umowy serwisowe
          Warszawa - Polska

          Comment

          • Voxie
            Junior Member
            • Jul 2009
            • 24

            #6
            Originally posted by mbsit
            Hi to All,
            As I have the same problem right now, I checked the nagios plugin and this plug-in uses telnet (port 23) connection to send commands.
            The same we can do in Zabbix using Telnet Agent.

            Ask me for about 1 mouth I will have the solution, because I have order to do something like that in one of my customer.

            Bests,
            Grzegorz

            Any updates ?

            Comment

            • MNfromH
              Junior Member
              • Sep 2015
              • 11

              #7
              zabbix_agentd on the i

              Using PASE or QSH, in this case bash via SSH:
              Code:
              user@idev:~ # system wrksyssts | head -n2
                                                           Systemstatusinformation                                                   Page     1
              ------- V7R1M0  ------                                                                            IDEV      17.02.16  13:19:26 CET
              Code:
              user@idev:~ # zabbix_agentd --version
              ZABBIX Agent (daemon) v1.4.6 (23 July 2008)
              Compilation time:  Nov 12 2008 16:58:24
              Code:
              user@idev:~ # ps auxww | grep zabbix
              zabbix 1502241  0.0  0.0 1970964    0      - A      Feb 10  0:40 /QOpenSys/usr/sbin/zabbix_agentd
              zabbix 1502242  0.0  0.0 1983620    0      - A      Feb 10  0:40 /QOpenSys/usr/sbin/zabbix_agentd
              zabbix 1502243  0.0  0.0 1971728    0      - A      Feb 10  0:40 /QOpenSys/usr/sbin/zabbix_agentd
              zabbix 1502240  0.0  0.0 4164    0      - A      Feb 10  0:02 /QOpenSys/usr/sbin/zabbix_agentd
              zabbix 1502244  0.0  0.0 3776    0      - A      Feb 10  0:01 /QOpenSys/usr/sbin/zabbix_agentd
              zabbix 1502238  0.0  0.0 4072    0      - A      Feb 10  0:00 /QOpenSys/usr/sbin/zabbix_agentd
              Code:
              user@idev:/etc/zabbix # tree /etc/zabbix/
              /etc/zabbix/
              |-- scripts
              |   |-- local.ibmi.asp.total.gb.sh
              |   |-- local.ibmi.asp.used.gb.sh
              |   |-- local.ibmi.asp.used.percent.sh
              |   |-- local.ibmi.cpu.load.percent.sh
              |   |-- local.ibmi.hostname.sh
              |   |-- local.ibmi.job.status.sh
              |   |-- local.ibmi.msgw.sh
              |   `-- userparameters.conf
              `-- zabbix_agentd.conf
              
              1 directory, 10 files
              Code:
              user@idev:/etc/zabbix # tree /var/log/zabbix
              /var/log/zabbix
              `-- zabbix_agentd.log
              Code:
              user@idev:/etc/zabbix # tree /var/run/zabbix
              /var/run/zabbix
              `-- zabbix_agentd.pid
              
              0 directories, 1 file
              Code:
              user@idev:/etc/zabbix # ls -l /QOpenSys/usr/sbin/zabbix*
              -rwx------    1 zabbix 0            144561 Jan 21 11:42 /QOpenSys/usr/sbin/zabbix_agent
              -rwx------    1 zabbix 0            157638 Jan 21 11:42 /QOpenSys/usr/sbin/zabbix_agentd
              Code:
              user@idev:/etc/zabbix # ls -l /QOpenSys/usr/bin/zabbix*
              -rwxr-xr-x    1 qsys 0             73472 Jul  6 2015  /QOpenSys/usr/bin/zabbix_get
              -rwxr-xr-x    1 qsys 0             91572 Jul  6 2015  /QOpenSys/usr/bin/zabbix_sender
              All the binaries work fine. I'm using the zabbix_agentd with a 2.2.5 Zabbix-Server on SLES 11. Any newer binaries fail with unsatisfiable deps like libperfstat.
              You have to create some unixish dirctory structure since changing the location of the config file, PID file and logfiles in /etc/zabbix/zabbix_agentd.conf crashed the agentd on startup.

              Most of the Linux OS items in Zabbix will return sane results. Others won't return anything which makes sense since most of the monitoring tools for unix don't exist on the i.
              Some of the more os400 specific items can be custom made with the great 'system' command.

              For example:
              Code:
              user@idev:~ # system wrkactjob
              Will return the well known output from wrkactjob with all jobs, subsystems, number .... . This can then be filtered with common unix tools available in QSH/PASE. I recommend getting all the awesome oss tools from perzl.org. Without them working on this isn't fun .

              I hope this helps you guys and I am REALLY interessted in your solutions and userparameters for monitoing the i with Zabbix. I'll post some of my userparameters if there is some activity here.

              If any question arises I'll be monitoring this thread

              EDIT: Grammar.
              Last edited by MNfromH; 17-02-2016, 18:04.

              Comment

              • FabrizioA
                Member
                • Sep 2015
                • 33

                #8
                Hi MNfromH,

                I followed your instruction on my AS400 7R1M0.
                I used Zabbix Agent (Linux 2.4.x Agents - 1.4.4 i386), but when I try to run zabbix_agentd from my ssh connection to AS400, I get:

                Code:
                /zabbix_agentd: 001-0050 Errore di sintassi sulla riga 1: token "(" non previsto.
                Where am I wrong?

                Comment

                • MNfromH
                  Junior Member
                  • Sep 2015
                  • 11

                  #9
                  Hey FabrizioA,

                  looks like you're using the x86 precompiled binary.
                  Try the ppc binary for aix 5.2. That should do the trick.

                  http://www.zabbix.com/downloads/1.4....powerpc.tar.gz

                  Max

                  Comment

                  • FabrizioA
                    Member
                    • Sep 2015
                    • 33

                    #10
                    Hi Max,

                    thanks for reply. This Sunday I've realized that OS/400 (PowerPC) supports Aix binaries.
                    Now, I'm using Zabbix Agent 1.4.6 for Aix 6.1. The agentd starts normally but it wants a zabbix user and a zabbix group.
                    On AS/400 (my version is 7R1M0) we can't have a "zabbix" user's username with the same "zabbix" group name... and the agent return:

                    Code:
                    abbix_agentd [129528]: Cannot initgroups to zabbix [Invalid argument].
                    I belive that I need to recompile the agentd with the correct user's name and user's group on sources.

                    That do you think about?

                    Thanks for your support.

                    Comment

                    • MNfromH
                      Junior Member
                      • Sep 2015
                      • 11

                      #11
                      Hey,

                      could i have a look at your /etc/zabbix/zabbix_agentd.conf ?

                      Comment

                      • FabrizioA
                        Member
                        • Sep 2015
                        • 33

                        #12
                        Hi, I get the zabbix_agentd.conf from Zabbix 1.4.7 sources (the compiled agent doesn't have the .conf). In the zabbix_agentd.conf I don't see any particular configuration about user and user group.
                        I've just realized that I can't compile the agent from inside my AS400 because I haven't the C compiler installed)

                        Comment

                        • MNfromH
                          Junior Member
                          • Sep 2015
                          • 11

                          #13
                          I reproduced your problem and kind of fixed it but im not really happy with the results.

                          I gues on your first run of the agentd the agentd complained about a missing user "zabbix".

                          Did you create a new userprofile "ZABBIX" via CRTUSRPRF? If so, delete it. I think the agent tries to check for the existence of a userprofile "zabbix" via id -un or some API and then tries to "su" to it. Since we dont ahve a "su" in PASE this fails hard. Giving some obscure errors like yours.

                          Well, the bad news here is: After removing the user "zabbix" from the system the agentd only would run when the invoking userprofile has the attribute
                          GRPPRF(QPGMR) - wich of course raises some security questions.

                          I don't quite understand what is happening here. Even after adding all special permissions from QPGMR to my zabbix-agentd user the agentd would only run when the profile has it GRPPRF as QPGMR.

                          So, the quick fix for your problem shoudl be:

                          1. Remove user "zabbix" from the system
                          2. Addd GRPPRF(QPGMR) to the userprofile which invokes the agentd
                          3. Re login
                          4. ./zabbix_agentd should be working

                          I try to get a hand on that QPGMR GRPPRF thing.

                          Comment

                          • MNfromH
                            Junior Member
                            • Sep 2015
                            • 11

                            #14
                            Lol, guess what. It has nothing to do with the grp "qpgmr".

                            I think zabbix checks if your current user is in the group with GID=0. On Unix this would indicate that you are in fact root.

                            Now imagine you are an os400 programmer and you have the job to assign a numerical value to *NONE.

                            Thats right, someone thought "0" as a fitting number.

                            As soon as you have "GRPPRF (*NONE)" in your Userprofile the command "# id" returns gid=0. Every unix program checking the GID will think you are root.

                            Fix: Create a DUMMYGRP and assign your zabbix-daemon-user to it so you get GID != 0.

                            No more special permissions needed.
                            Last edited by MNfromH; 29-03-2016, 15:44.

                            Comment

                            • FabrizioA
                              Member
                              • Sep 2015
                              • 33

                              #15
                              Hi MNfromH,

                              I was just answering to you...
                              I had been execute zabbix_agentd with QSECOFR (root) user with that error... after reading the Zabbix docs, I've realized that when we launch zabbix_agentd with a root user, Zabbix try to automatic switch from this user (root) from "zabbix" dummy user.
                              Then, I created a normal user (I called it "zbx") and then log from ssh to it... when I launched zabbix_agentd with zbx user all works ok

                              One question: in your opinion is possible to compile Zabbix Agent 2.2.x on an existing Aix machine with some flag that include dynamic libraries to the build??

                              Comment

                              Working...