Ad Widget

Collapse

Collect print queue data - Lexmark

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NicolasSC
    Junior Member
    • Oct 2022
    • 1

    #1

    Collect print queue data - Lexmark

    Hello friends. I need to monitor the print queues of some printers on my network, but I can't find anything related to this subject in my research. I currently have more than 10 printers connected through the windows print server and monitoring them is essential. Most printers are Lexmark

    I'm monitoring ICMP and toner level on them, but print queue is missing

    --

    Idioma: PT-BR:

    Olá amigos. Preciso monitorar as filas de impressão de algumas impressoras da minha rede, mas não encontro nada relacionado a esse assunto em minhas pesquisas. Atualmente tenho mais de 10 impressoras conectadas através do servidor de impressão do Windows e monitorá-las é essencial. A maioria das impressoras são Lexmark

    Estou monitorando ICMP e nível dos toners nelas, mas falta fila de impressão
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Is your goal to monitor the queues on the Windows print server, or to monitor jobs on the printer itself? Does the printer support the notion of a queue, so that there could be multiple jobs accepted by the printer while it waits for one to finish printing?

    Forgetting about Zabbix for a minute, how would you accomplish what you're trying to do if you were just going to do this manually? SNMP? Browsing a web interface on the printer? Traditional BSD-style "LPR" protocol commands sent to the device?

    If you can come up with the commands or method to get the data you're interest in, then it's definitely possible to make Zabbix collect that data, but you have to know what command(s) or protocols you can use to gather the data.

    Comment

    • Argon0
      Member
      • Mar 2023
      • 51

      #3
      Hi, first post here, have tried to do this on CheckMK but ran into graphing issues of the metrics once gathered.

      With the CheckMK agent I was able to gather a lot of data, but not use it all (yet)...

      E.g.
      Print Queue name, Jobs in queue, Jobs Printed, Pages Printed, Errors

      (e.g.: using this command:
      Code:
       Get-WMIObject Win32_PerfFormattedData_Spooler_PrintQueue | Select Name, Jobs, @{name="PrinterStatus";exp={0}}, @{name="DetectedErrorState";exp={0}}, JobErrors, JobsSpooling, MaxJobsSpooling, TotalJobsPrinted, TotalPagesPrinted | Sort Name​ | format-table
      gave a table looking something like this

      Code:
      Name                          Jobs PrinterStatus DetectedErrorState JobErrors JobsSpooling MaxJobsSpooling TotalJobsPri
                                                                                                                         nted
      ----                          ---- ------------- ------------------ --------- ------------ --------------- ------------
      _Total                           1             0                  0         1            0               0            1
      AORS16193Q610                    0             0                  0         0            0               0            0​
      I ended up using CIM-GetInstance instead (as it is slightly quicker, and more portable), all running in a PowerShell Script plugin for the CheckMK agent.

      But I can't get it to graph these interesting stats... Thus my interest in Zabbix...

      (BTW the PrinterStatus, and DetectedErrorState columns are set to 0 as the plugin in CheckMK was expecting something in these columns but I don't care about them, and it complicates things and takes a long time on my servers to gather this data.)

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        I don't know what "CheckMK" is, but in situations where you want to run one command to gather a bunch of datapoints at once and then act on the individual datapoints , the documentation on "Dependent items" is very handy: https://www.zabbix.com/documentation...ependent_items

        Comment

        • Argon0
          Member
          • Mar 2023
          • 51

          #5
          Thanks Tim. FYI CheckMK is simply an alternative monitoring solution to Zabbiz - a Nagios fork...

          Comment

          • Argon0
            Member
            • Mar 2023
            • 51

            #6
            So can you get the zabbix agent to run a local powershell script on the host being monitored? (the above command is one that can be used in a powershell script - either locally (as it stands) or with the addition of the -computername switch for a remote host (or, as it happens, multiple remote hosts).

            How do you handle the outputs from that script?

            Comment

            • tim.mooney
              Senior Member
              • Dec 2012
              • 1427

              #7
              Originally posted by Argon0
              So can you get the zabbix agent to run a local powershell script on the host being monitored? (the above command is one that can be used in a powershell script - either locally (as it stands) or with the addition of the -computername switch for a remote host (or, as it happens, multiple remote hosts).

              How do you handle the outputs from that script?
              It always helps to read the documentation. Custom items (documented in Chapter 5 as "User Parameters") are well supported by Zabbix, including PowerShell scripts if you get the invocation correct and it runs quickly enough. https://www.zabbix.com/documentation...userparameters

              The documentation on dependent items discusses using preprocessing to extract each part you need from the overall: https://www.zabbix.com/documentation...ependent_items

              Comment

              • Argon0
                Member
                • Mar 2023
                • 51

                #8
                Thank you for the pointers. Before I dive deeply into Zabbix I just want to check - if I get the correct data out of my host (I know how to get the data on screen via a powershell script) - will I be able to graph the data easily?

                Comment

                • Argon0
                  Member
                  • Mar 2023
                  • 51

                  #9
                  Yes it will. Many ways to do what I want by the looks of it..

                  Comment

                  Working...