Ad Widget

Collapse

IBM AIX Printer DOWN Status (?)

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • per.hillerstrom
    Junior Member
    • Aug 2023
    • 18

    #1

    IBM AIX Printer DOWN Status (?)

    So, I am successfully using Zabbix Agent for IBM AIX with AIX Template and now I would like to add a new monitor alert and that is when a printer changes from READY status to DOWN instead.

    I have a couple of AIX servers with +150 remote printers per server and of course every now and then some of the printer will go in DOWN status and when that happens I would like to be notified.


    Click image for larger version

Name:	2023-08-01 10_53_52-Clipboard.png
Views:	399
Size:	21.5 KB
ID:	468072


    Anyone know how I can use Zabbix for this?


    Regards,
    Per
  • Answer selected by per.hillerstrom at 03-08-2023, 11:32.
    ISiroshtan
    Senior Member
    • Nov 2019
    • 324

    I'd probs work on script to read output of enq and transform it into CSV -> feed result into Zabbix discovery process with "CSV to JSON" preprocessing. Tho it greatly depends if one really needs extra information from enq output or the history of state of each printer.

    Very simplified version is to run something along the lines of
    Code:
    system.run[enq -AsW | tail -n +3 | grep -v READY || echo "OK"]
    and trigger on last()<>"OK" which should fire alert if server has any non-ready printers, but you'd need to go into latest data/operational data or connect to server to actually see what printers have issuse (also Zabbix agent needs permission to run said command via system.run in config)

    Comment

    • per.hillerstrom
      Junior Member
      • Aug 2023
      • 18

      #2
      Solved this by creating a script on each server checking for printers with DOWN status.
      On Zabbix Server I use vfs.file.contents[file,ANSI] with Zabbix agent (active), but if someone have another good solution I am still curious.

      Click image for larger version

Name:	2023-08-02 13_36_08-Clipboard.png
Views:	207
Size:	15.3 KB
ID:	468179
      Attached Files

      Comment

      • jtnfoley
        Member
        • Mar 2022
        • 76

        #3
        It's been a long, LONG time since I've touched AIX so take the following with a pound of salt... I'm interested in doing something similar on RHEL soon so I'll jump in and watch the thread evolve.
        I've also never done anything useful in Zabbix with traps, for realtime alerts on queue status I'd head down that path.

        It looks like AIX SNMP has some ability to monitor queues.


        It also looks like the folks at SolarWinds do this with perl scripts, so you may be on the right track with OS scripts executed by zabbix.
        Use this SAM template to assess the status and performance of an AIX LPD print service and uses Perl scripts to retrieve performance data.

        Comment

        • tim.mooney
          Senior Member
          • Dec 2012
          • 1427

          #4
          I would likely do the same as both of you have discussed, scripts that are used by custom items.

          Alternately, if the AIX equivalent to the line printer daemon (LPD) writes useful messages to a log file, including when queues transition to DOWN, you could use an active item (it must be active) and a log file monitor.

          Comment

          • ISiroshtan
            Senior Member
            • Nov 2019
            • 324

            #5
            I'd probs work on script to read output of enq and transform it into CSV -> feed result into Zabbix discovery process with "CSV to JSON" preprocessing. Tho it greatly depends if one really needs extra information from enq output or the history of state of each printer.

            Very simplified version is to run something along the lines of
            Code:
            system.run[enq -AsW | tail -n +3 | grep -v READY || echo "OK"]
            and trigger on last()<>"OK" which should fire alert if server has any non-ready printers, but you'd need to go into latest data/operational data or connect to server to actually see what printers have issuse (also Zabbix agent needs permission to run said command via system.run in config)

            Comment

            • per.hillerstrom
              Junior Member
              • Aug 2023
              • 18

              #6
              Thanks for your feedback jtnfoley, tim.mooney and ISiroshtan.

              Comment

              • per.hillerstrom
                Junior Member
                • Aug 2023
                • 18

                #7
                Originally posted by ISiroshtan
                I'd probs work on script to read output of enq and transform it into CSV -> feed result into Zabbix discovery process with "CSV to JSON" preprocessing. Tho it greatly depends if one really needs extra information from enq output or the history of state of each printer.

                Very simplified version is to run something along the lines of
                Code:
                system.run[enq -AsW | tail -n +3 | grep -v READY || echo "OK"]
                and trigger on last()<>"OK" which should fire alert if server has any non-ready printers, but you'd need to go into latest data/operational data or connect to server to actually see what printers have issuse (also Zabbix agent needs permission to run said command via system.run in config)

                So, I changed my setup and I'll go for this solution instead but I have set the command as below instead and trigger works as expected aswell. Thanks alot!

                Code:
                enq -AsW | tail -n +3 | grep -v -E 'READY|RUNNING|INIT|INITIALIZE|SENDING|GETHOST|CONNECT|BUSY' || echo "OK"

                Comment

                Working...