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

Can not enter SNMPv3 arguements as fields. #29

Closed Fl33Tr closed 1 year ago

Fl33Tr commented 1 year ago

It would be very nice to hand over auth/priv mode/key as an arguement field.

Tylan commented 1 year ago

Would you mind elaborating a bit? I want to make sure I understand exactly what you mean.

Fl33Tr commented 1 year ago

Would you mind elaborating a bit? I want to make sure I understand exactly what you mean.

Sure,

(as far as I understand the plugin) you need to provide a auth/priv mode and then the respective keys for the plugin to work with snmpv3. I dont see any options to do that with customs fields. image

Tylan commented 1 year ago

Ahh, thanks for the clarification. I updated the printers.conf file:

https://github.com/Tylan/check_snmp_printer/blob/master/printers.conf

That should be what you need. If using Icinga2 it'll probably go:

/usr/share/icinga2/include/plugins-contrib.d/

Let me know if that gives you what you need.

Fl33Tr commented 1 year ago

Ahh, thanks for the clarification. I updated the printers.conf file:

https://github.com/Tylan/check_snmp_printer/blob/master/printers.conf

That should be what you need. If using Icinga2 it'll probably go:

/usr/share/icinga2/include/plugins-contrib.d/

Let me know if that gives you what you need.

Thank you, I will test it right away. On a side note. Certain printers like the Lexmark MX511 appear to not have an option for the auth/priv keys. Can the plugin handle that? I did some playing around but did not get it to work. This is how the config site looks like: image

Tylan commented 1 year ago

Sorry about delay - holidays and all.

I'll be honest, I'm not sure what I'm looking at above. Is that from Icinga? I honestly never used the web interface for adding stuff to it and now I've moved companies and we use Nagios XI. The plugin can support auth/priv keys. They might not be visible through the template you're using above. I was working on a configuration wizard similar to what you're showing above for Nagios. I wonder if that's the same thing? Happy to help, just trying to get a better understanding.

Fl33Tr commented 1 year ago

Sorry about delay - holidays and all.

I'll be honest, I'm not sure what I'm looking at above. Is that from Icinga? I honestly never used the web interface for adding stuff to it and now I've moved companies and we use Nagios XI. The plugin can support auth/priv keys. They might not be visible through the template you're using above. I was working on a configuration wizard similar to what you're showing above for Nagios. I wonder if that's the same thing? Happy to help, just trying to get a better understanding.

Hi,

sorry for replying so late and keeping this issue open. The printer I have issues with will (thankfully) be replaced in the foreseeable future. Thank you for your efforts <3

Tylan commented 1 year ago

I know this is a closed case, but I think I have an HP printer similar to your issue in my environment and now have a full understanding of your issue. My HP printer uses Auth/Priv keys and not passphrases. It is very old (4250) and can only support MD5/DES. I have devices that use auth/priv keys that are working just fine when I use those keys in the passphrase fields. This HP printer is just too old I believe and will not work. I get Authentication failure (incorrect password, community or key) even though I have everything correct. snmpwalk returns the same results so it's not a limitation of the script. HP's are finicky with using a Context name, but that isn't an issue here either. I believe there are just some old devices that will not work with today's SNMPv3. Upgrade of printer is the only option in these cases if you need SNMPv3 to work.

Tylan commented 1 year ago

Actually, take back everything I said. I found the root cause and it is a coding error. Stay tuned. I'll see about getting it in on the new 2.0 release upcoming. I changed modules from Net::SNMP to SNMP. Also working on adding firmware checking. The devel build is updated here and there but it's mostly beta.

Tylan commented 1 year ago

Just letting you know I published the 2.0 release. There is a bug I believe in the Net-SNMP module in regards to AuthKey and PrivKey usage. I have an issue opened over on their Github page to try and resolve. Please open another issue if you experience any oddness with this new release. Thanks.