Check_snmp_printer no usable bc

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ThinkFast86
Posts: 26
Joined: Fri Jul 24, 2015 5:30 am

Check_snmp_printer no usable bc

Post by ThinkFast86 »

I need your help please with this issue:
When i am trying to use this snmp service i am receiving the following error: UNKNOWN: check_snmp_printer: No usable 'bc' binary in '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

Here you can find the config for host and command:
HOST
  • define host{
    use linux-server ; Name of host template to use
    ; This host definition will inherit all variables that are defined
    ; in (or inherited by) the linux-server host template definition.
    host_name bizhubc284e
    notes_url http://private ip
    alias bizhubc284e
    address private ip
    max_check_attempts 3
    check_period 24x7
    check_command check-host-alive
    contacts nagiosadmin
    notification_interval 60
    notification_period 24x7
    notification_options d,r
    contact_groups admins
    }
    define service {
    host_name bizhubc284e
    use generic-service
    service_description CONSUM_ALL
    check_command check_snmp_printer!public!"CONSUM ALL"!20!10
    normal_check_interval 10
    retry_check_interval 1
    }
COMMANDS
  • define command {
    command_name check_snmp_printer
    command_line $USER1$/check_snmp_printer -H $HOSTADDRESS$ -C $ARG1$ -x $ARG2$ -w $ARG3$ -c $ARG4$
    }
Could you please advise?
Last edited by ThinkFast86 on Mon Oct 17, 2016 4:01 pm, edited 1 time in total.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Check_snmp_printer no usable bc

Post by dwhitfield »

Are you using Nagios Core or Nagios XI? I'd like to move this to the appropriate forum.

And while I'm asking, could you give us version numbers and the OS on which Nagios is running too? Thanks!
ThinkFast86
Posts: 26
Joined: Fri Jul 24, 2015 5:30 am

Re: Check_snmp_printer no usable bc

Post by ThinkFast86 »

dwhitfield wrote:Are you using Nagios Core or Nagios XI? I'd like to move this to the appropriate forum.

And while I'm asking, could you give us version numbers and the OS on which Nagios is running too? Thanks!
I am using Nagios Core 4.2.1 with plugins 2.1 and is installed on ubuntu server 16.04.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_snmp_printer no usable bc

Post by tgriep »

Your system is missing the BC package and it needs to be installed by running the following on your server.

Code: Select all

sudo apt-get install bc
Try that and let us know if this works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Check_snmp_printer no usable bc

Post by dwhitfield »

Let's try apt-get -y install bc

If that doesn't do it, then we'll have to add it to your path manually.
ThinkFast86
Posts: 26
Joined: Fri Jul 24, 2015 5:30 am

Re: Check_snmp_printer no usable bc

Post by ThinkFast86 »

Thank you for you kind support guys!! Now is ok. Really thank you!!!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Check_snmp_printer no usable bc

Post by dwhitfield »

Whoops, didn't see @tgriep's response. But hey, at least we were on the same page!

This seems resolved. Ready to close?
Locked