Results 1 to 4 of 4

Thread: Problem with check_snmp_mem.pl

  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    16

    Problem with check_snmp_mem.pl

    Hi,

    I am a beginner at Shinken 2.0. I am starting to have a good practice of Shinken basics but I can't get SNMP checks working. I really don't understand why. I have to say I am not confortable with SNMP.

    My infra:
    centos-shinken1, ip XX.XX.XX.XX, with shinken 2.0, webui, linux-ssh, linux-snmp, auth-cfg-passwd, rentention-mongodb modules
    ubuntu-server, ip YY.YY.YY.YY, with the mongodb database and snmpd running on it

    For ubuntu-server, I have installed the pack snmp-mibs-downloader as it is advised here --> https://help.ubuntu.com/community/SNMPAgent

    My snmp.conf and snmpd.conf
    Code:
    victor@ubuntu-mgs:~$ cat /etc/snmp/snmp.conf 
    # As the snmp packages come without MIB files due to license reasons, loading
    # of MIBs is disabled by default. If you added the MIBs you can reenable
    # loading them by commenting out the following line.
    #mibs :
    victor@ubuntu-mgs:~$ sudo cat /etc/snmp/snmpd.conf
    rocommunity mgs_community
    syscontact #####@#####.com
    syslocation Europe/France/Nantes/blabla
    On centos-shinken1, I can do
    Code:
    # snmpwalk -v 2c -c mgs_community YY.YY.YY.YY 1.3.6.1.4.1.2021.4.11.0
    UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 98376 kB
    But I can't get check_snmp_mem.pl working
    Code:
    # /var/lib/shinken/libexec/check_snmp_mem.pl -w 85 -c 95 -- -c mgs_community YY.YY.YY.YY
    SNMP problem - no value returned
    In case you would ask, my resource.d/snmp.cfg is
    Code:
    [root@centos-shinken1 ~]# cat /etc/shinken/resource.d/snmp.cfg 
    # default snmp community
    #$SNMPCOMMUNITYREAD$=public
    $SNMPCOMMUNITYREAD=mgs_community
    Can you help me with my problem ?

    Thanks,

    tOHTor


    Edit: something new when I tried to use the exact command from /etc/shinken/packs/linux-snmp/commands.cfg and command "check_linux_memory"

    Code:
    [root@centos-shinken1 linux-snmp]# /var/lib/shinken/libexec/check_snmp_mem.pl -w 85 -c 95 -- -v 2c -c mgs_community YY.YY.YY.YY
    Argument "1017920 kB" isn't numeric in numeric eq (==) at /var/lib/shinken/libexec/check_snmp_mem.pl line 118.
    Argument "96328 kB" isn't numeric in subtraction (-) at /var/lib/shinken/libexec/check_snmp_mem.pl line 127.
    Argument "15396 kB" isn't numeric in subtraction (-) at /var/lib/shinken/libexec/check_snmp_mem.pl line 129.
    Argument "671608 kB" isn't numeric in subtraction (-) at /var/lib/shinken/libexec/check_snmp_mem.pl line 129.
    MEMORY OK: 23.05 % used; Free => 96328 kB Kb, Total => 1017920 kB Kb, Cached => 671608 kB Kb, Buffered => 15396 kB Kb|ram_free=96328 kB ram_total=1017920 kB ram_cached=671608 kB ram_buffered=15396 kB
    This result leads me to other questions: Is the script bad ? (it seems so because of bad parsing) Or maybe I am doing something wrong with the use of the script ?
    In your case, how do you use snmp to monitor linux hosts ?

  2. #2
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Problem with check_snmp_mem.pl

    Sorry I can't help you, I use the ssh checks
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3
    Junior Member
    Join Date
    Jun 2014
    Posts
    16

    Re: Problem with check_snmp_mem.pl

    Thanks anyway !

    I have more or less resolved my problem. In fact, I hadn't installed all necessary packages and I had an error in resource.d/snmp.conf my workmate found immediately (it's always useful to have a second look at what you are doing).

    In large environnement, is it better to use ssh checks or snmp checks (in a matter of performance) ?

  4. #4
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Problem with check_snmp_mem.pl

    snmp are faster I think but I didn't bench them.

    but you will get far better information with ssh ones
    No direct support by personal message. Please open a thread so everyone can see the solution

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •