+ Post New Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 36
*nix Thread, Nagios Issues in Technical; I'm a novice with linux having only played around with it on my home computer, however for my apprenticeship they ...
  1. #1

    Join Date
    Mar 2013
    Posts
    24
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Nagios Issues

    I'm a novice with linux having only played around with it on my home computer, however for my apprenticeship they have asked me to setup Nagios on a Linux server - I've gotten the LAMP server up and running (Ubuntu 12.10) and have got cacti up and running however Nagios is causing my head to hurt.

    Nagios is up and running and can be accessed remotely using the localhosts IP address. First off we had authentifcation issues after logging into the account - i'm not sure if the issue i'm having now is a remnant of the prior issue i just mentioned. (Apologises for rambling)

    I have added a switch which pings fine with Nagios (I think it does at least), however I tried to monitor ports via SNMP and have come up with this error

    "External command error: MIB search path: $HOME/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp"

    Attachment 17655

    I've installed the plugins and checked that they are where they should be and they seem to be though perhaps i've installed them incorrectly - I've reinstalled them since i installed it the first time following instructions.

    This is probably a simple fix staring me in the face!

    Let me know if there is anything that i need to provide (and how to provide it if possible)

    Any help would be much apprecitated.
    (Apologises if you have seen this question before)

  2. #2


    Join Date
    May 2009
    Posts
    2,914
    Thank Post
    259
    Thanked 770 Times in 585 Posts
    Rep Power
    270
    As I recall with the nagios package on ubuntu the binary for querying SNMP isn't where it is expected to be. You need to find it and then either add it to the path OR alter the commands config file to point explicitly to it OR copy the binary into the Nagios bin directory.

  3. #3

    Join Date
    Mar 2013
    Posts
    24
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    By chance do you remember places to check?

    Thanks for your comment, it's a lead to follow (:

  4. #4


    Join Date
    May 2009
    Posts
    2,914
    Thank Post
    259
    Thanked 770 Times in 585 Posts
    Rep Power
    270
    You are looking for a binary file check_snmp. So

    sudo find / -name check_snmp

    Should tell you where the file is (if you have it).

    I think it should really be in /usr/lib/nagios/plugins/

    (should I add these need to be run from a shell??)
    Last edited by pcstru; 26th March 2013 at 09:16 AM.

  5. #5

    Join Date
    Mar 2013
    Posts
    24
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Lol I maybe a novice but not that much of one xD I didn't know that command however.

    Thank you

  6. #6

    Join Date
    Mar 2013
    Posts
    24
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    The file check_snmp is located in /usr/lib/nagios/plugins.. It was there by default I didn't have to move it. Though it is also located in /usr/local/nagios/libexec/ as well - is this a problem?

  7. #7


    Join Date
    May 2009
    Posts
    2,914
    Thank Post
    259
    Thanked 770 Times in 585 Posts
    Rep Power
    270
    It shouldn't be. Check your commands.cfg in /usr/local/nagios/etc . Does it have a line :
    Code:
    # 'check_snmp' command definition
    define command{
            command_name    check_snmp
            command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$
            }
    (You should also see a check_ping command in there?).

  8. #8

    Join Date
    Mar 2013
    Posts
    24
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    ImageUploadedByEduGeek1364293841.232729.jpgImageUploadedByEduGeek1364293886.401809.jpg

    Sorry for the late reply was at a meeting - both lines are present however the snmp one is different to the one you posted

  9. #9


    Join Date
    May 2009
    Posts
    2,914
    Thank Post
    259
    Thanked 770 Times in 585 Posts
    Rep Power
    270
    Ok. So what did you do to monitor ports on a switch? Presumably you have something in service.cfg?

    define service{
    use generic-service
    hostgroup_name switches
    service_description Uptime
    check_command check_snmp!-C [*******] -o .1.3.6.1.2.1.1.3.0

    }


    You can also go into (say) /usr/local/nagios/libexec and run check_snmp manually :

    cd /usr/local/nagios/libexec
    ./check_snmp <options>

  10. #10


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    Sanity check = /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

    is quite helpful.

    ps - you can copy and paste configs - it isn't windows.

  11. #11


    Join Date
    May 2009
    Posts
    2,914
    Thank Post
    259
    Thanked 770 Times in 585 Posts
    Rep Power
    270
    I think you will need more arguments on the check_snmp command in commands.cfg. It should do no harm to add more $ARG params, they will just be ignored if no value is given.

  12. #12

    Join Date
    Mar 2013
    Posts
    24
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    ImageUploadedByEduGeek1364295046.889025.jpg

    Here's the switch config - I used the template present so i'm guessing now that i've not changed something that i should have

    what are the ARG params? - going to add them in now
    Last edited by Jwebb; 26th March 2013 at 10:53 AM.

  13. #13

    Join Date
    Mar 2013
    Posts
    24
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by CyberNerd View Post
    Sanity check = /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

    is quite helpful.

    ps - you can copy and paste configs - it isn't windows.
    Ive just used this command and it has returned 0 warnings 0 errors

  14. #14

    Join Date
    Mar 2013
    Posts
    24
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Restarted nagios and checked to see if changes made would fix the issue, no such luck ): I'll be back in 30m-60ms

    Thanks for the help so far

  15. #15
    AJWhite1970's Avatar
    Join Date
    Sep 2012
    Location
    Wiltshire
    Posts
    325
    Thank Post
    83
    Thanked 75 Times in 57 Posts
    Rep Power
    16
    Is this doc any use? It's the one I used to setup Nagios. Version numbers are slightly different but the setup is still the same.

    Nagios Installation On Ubuntu 10.04 (Lucid Lynx) - Page 3 | HowtoForge - Linux Howtos and Tutorials

    Andrew

SHARE:
+ Post New Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Linux Format, January Issue
    By kingswood in forum *nix
    Replies: 11
    Last Post: 5th December 2005, 11:02 AM
  2. Squid issues new install
    By ChrisH in forum *nix
    Replies: 5
    Last Post: 10th November 2005, 03:09 PM
  3. Gentoo issues
    By _Bob_ in forum *nix
    Replies: 1
    Last Post: 31st October 2005, 02:29 PM
  4. Exchange 2003 and Server 2003 SP1 issue.
    By tosca925 in forum Windows
    Replies: 0
    Last Post: 21st August 2005, 10:32 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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