Ad Widget

Collapse

scripts with ssh check

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gfalardi
    Junior Member
    • Sep 2009
    • 11

    #1

    scripts with ssh check

    Hi,

    the correct syntax for ssh check is, for example, :

    [test,192.168.1.1,22,<encoding>]

    what I'm suppose to put at 'encoding' ?

    [test,192.168.1.1,22,/home/user/scripts/test.sh]

    or

    [test,192.168.1.1,22,cat test.txt|wc -l]

    Because in 'latest data' section it always return 0.

    regards.
  • dagun
    Member
    • Sep 2009
    • 71

    #2
    Hi,guys

    Originally posted by gfalardi
    Hi,

    the correct syntax for ssh check is, for example, :

    [test,192.168.1.1,22,<encoding>]

    what I'm suppose to put at 'encoding' ?

    [test,192.168.1.1,22,/home/user/scripts/test.sh]

    or

    [test,192.168.1.1,22,cat test.txt|wc -l]

    Because in 'latest data' section it always return 0.

    regards.

    Can you help me with it.
    How to configure ssh checks .Please give me a example.Thanks.

    Comment

    • gfalardi
      Junior Member
      • Sep 2009
      • 11

      #3
      In the configuration of your item, you should write [test,192.168.1.1,22,/home/user/scripts/test.sh] (where your script is located)

      Under there is part where you write what's in the script zabbix is looking for (here, test.sh). For exemple 'cat test.txt|wc -l'

      It worked for me, but to monitor all items in ssh, you might have to write a script for each items.

      Comment

      • bashman
        Senior Member
        • Dec 2009
        • 432

        #4
        Here is an example:

        Code:
        Host: <hostname>
        Description: testing ssh
        Type: SSH agent
        Key: ssh[<IP>] 	
        Authentication method: Password
        User name: root
        Public key file:                
        Private key file:
        Passphrase: ********* 	
        Executed script: ls -l /tmp
        Type of information: Text 	
        Update interval (in sec): 700
        Attached Files
        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

        Comment

        • bashman
          Senior Member
          • Dec 2009
          • 432

          #5
          Originally posted by gfalardi
          Hi,

          the correct syntax for ssh check is, for example, :

          [test,192.168.1.1,22,<encoding>]

          what I'm suppose to put at 'encoding' ?

          [test,192.168.1.1,22,/home/user/scripts/test.sh]

          or

          [test,192.168.1.1,22,cat test.txt|wc -l]

          Because in 'latest data' section it always return 0.

          regards.
          You can use utf8
          978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

          Comment

          Working...