Need help and example of check_by _ssh to monitor disk space on remote server

Hi Team,
can you please provide me any example configuration as i want to monitor on remote server which is running on HPUX platform.
so i am using check_by_ssh module by nagios in icinga, so need sample configuration
examples as i have setup password less connection into my icinga master server and remote server.
@mfrosch : can you help the same.
BR,
GauravS

Example:

apply Service "linux_partitions" {
    display_name = "Linux Partitions"

    check_command = "by_ssh"
    vars.by_ssh_command = "/usr/lib/nagios/plugins/check_disk"
    vars.by_ssh_logname = host.vars.ssh_username
    vars.by_ssh_arguments = {
        "-w" = "20%"
        "-W" = "20%"
        "-c" = "10%"
        "-K" = "10%"
        "-x" = [
            "none",
            "tmpfs",
            "sysfs",
            "proc"
        ]
    }

    assign where ...
}

Hey there,

I suggest to use a custom check_command for that, when you have the ability to use normal configuration.

object CheckCommand "disk_by_ssh" {
  import "disk"
  import "by_ssh"
  vars.by_ssh_command = "$custom_plugin_dir$/check_disk"
  vars.by_ssh_arguments = {{ get_check_command("disk").arguments }}
}

In this case you have all arguments from the original disk check available and you can customize the plugin dir to the HPUX path. something like /opt/csw i guess?

If you are using the director, try to import the command from the api.

Example Service:
object Service "Partition /root"
  import "generic-service"

  check_command = "disk_by_ssh"
  vars.disk_partition = "/root"
}