Tylan / check_snmp_printer

Icinga Plugin for Checking SNMP Printer Status (Trays, Consumables and Pagecounts)
GNU General Public License v3.0
12 stars 4 forks source link

The output is not multiline #2

Closed Terminator81 closed 5 years ago

Terminator81 commented 5 years ago

Thanks for the quick fix of the other problem. The execution works now. Only the outputs appear, e.g. Consumption, in a row and not in several, can one still adjust that?

Plugin-Output: OK: 28 is at 93.00% remaining.<br>OK: 28 is at 38.00% remaining.<br>OK: 28 is at 38.00% remaining.<br>OK: 28 is at 72.00% remaining.<br>

OK: 28 is at 93.00% remaining.
OK: 28 is at 38.00% remaining.
OK: 28 is at 38.00% remaining.
OK: 28 is at 72.00% remaining.

so it would be great

by the way, what means 28?

Tylan commented 5 years ago

Are you using this via Icinga? the \<br> should provide the new line per each output. If you run it via the command line you will see it just as you show - on a single line. It looks better via the web (Icinga) which is what it was designed for.

For the "28", that's a great question - can you provide the model of the printer you are trying to query so I can investigate?

Terminator81 commented 5 years ago

its Canon iR-ADV C5250 i am using icingaweb2 (actual version)

can I send you further suggestions?

Tylan commented 5 years ago

Ok, I have some Canon iR-ADV's in my environment as well so I will test against them. Yes, sorry, I meant icingaweb2. Odd that yours doesn't show as new lines. I'll try to throw a patch together to change them from \
to \n and see if that helps. I'm away for the weekend so I will look into this as soon as I can.

Tylan commented 5 years ago

Hi,

Can you download the patch newline_and_canon.patch then run to patch your check_snmp_printer file?

patch check_snmp_printer < newline_and_canon.patch

make sure paths are correct, above assumes they are both in the same directory.

Let me know how that works out.