Results 1 to 10 of 10

Thread: [RESOLVED] Getting SNMP data by SSH

  1. #1

    [RESOLVED] Getting SNMP data by SSH

    Hello,
    I have a quite common problem but i didn't find how to deal with it :
    we have an external web server and i would like to get data about it by an ssh access.
    I only need to call the snmp deamon on it like i do on my local network but i need to do it by ssh.

    I just started to use shinken so it might be obvious, i just spent my day to figure how to do it so if you could give me any tutorial on how to do this it would be awesome

    Thanks in advance

    --
    Cyril

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

    Re: Getting snmp data by ssh

    If you got an ssh access, why not use classic checks?
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3

    Re: Getting snmp data by ssh

    because i didn't find how to do it ???

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

    Re: Getting snmp data by ssh

    Just install nagios-plugins into your distant server, and run them with check_by_ssh.
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5

    Re: Getting snmp data by ssh

    I am really ashamed but i didn't find how to call check_by_ssh from my host,
    I mean it should be really easy but i didn't find how to call a command ( or add between the service ) to do this.


    thank you your help , i didn't expect to have help as quickly

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

    Re: Getting snmp data by ssh

    Maybe the better is to read a nagios plugins tutorials. Will help you to understand how all of this works There are plenty available around the net
    No direct support by personal message. Please open a thread so everyone can see the solution

  7. #7

    Re: Getting snmp data by ssh

    So i will, i didn't tought need it to get snmp data

    Thanks

  8. #8

    Re: Getting snmp data by ssh

    I found how to check but no how launch the commande from the webui

    Here is what i done :

    I made a couple of key so the user shinken don't have to put a password to connect on ssh

    in $shinken/etc/command.cfg i added the commande !
    Code:
    define command {
        command_name  check_ssh_load
        command_line  $USER1$/check_by_ssh -H $HOSTADDRESS$ -C "/user/local/shinken/libexec/check_load -w $ARG1$ -c $ARG2$"
    }
    in $shinken/etc/services.cfg ( and check_ssh_load.cfg just in case )
    Code:
    define service {
        use               local-service     
        hostgroup_name         	machines-locales
        service_description       Current Load
        check_command          check_ssh_load!5.0,4.0,3.0!10.0,6.0,4.0
    }
    i saw that's the line "hostgroup" will add this service on every host in this hostgroup but i don't find it in the webUI.

    Thanks in advance


    --
    Cyril

  9. #9

    Re: Getting snmp data by ssh

    It works !


    here is the code of the service i use :
    Code:
    define service {
        use               local-service     # ; check current load on machine
        #hostgroup_name         	machines-locales
        service_description       Current Load
        check_command          check_ssh_load!5.0,4.0,3.0!10.0,6.0,4.0
    
    
    	 host_name        techlimed-5
    	# service_description   check-disk-sda1
    	# check_command      check-disk!/dev/sda1
    	 max_check_attempts   5
    	 check_interval     5
    	 retry_interval     3
    	 check_period      24x7
    	 notification_interval  30
    	 notification_period   24x7
    	 notification_options  w,c,r
    	# contact_groups     linux-admins
    	# icon_set        server
    	 }
    i think i was forgetting to put some required directive.

    Thanks a lot !

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

    Re: [RESOLVED] Getting SNMP data by SSH

    You're welcome
    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
  •