Problem with check disk on second VPS

Hello, I have problem with check disk from second VPS.

My config in file here:

 * Host definitions with object attributes
 * used for apply rules for Service, Notification,
 * Dependency and ScheduledDowntime objects.
 *
 * Tip: Use `icinga2 object list --type Host` to
 * list all host objects after running
 * configuration validation (`icinga2 daemon -C`).
 */

/*
 * This is an example host based on your
 * local host's FQDN. Specify the NodeName
 * constant in `constants.conf` or use your
 * own description, e.g. "db-host-1".
 */

object Host NodeName {
  /* Import the default host template defined in `templates.conf`. */
  import "generic-host"

  /* Specify the address attributes for checks e.g. `ssh` or `http`. */
  address = "127.0.0.1"
  address6 = "::1"

  /* Set custom attribute `os` for hostgroup assignment in `groups.conf`. */
  vars.os = "Linux"

  /* Define http vhost attributes for service apply rules in `services.conf`. */
  vars.http_vhosts["http"] = {
    http_uri = "/"
  }
  /* Uncomment if you've sucessfully installed Icinga Web 2. */
  //vars.http_vhosts["Icinga Web 2"] = {
  //  http_uri = "/icingaweb2"
  //}

  /* Define disks and attributes for service apply rules in `services.conf`. */
  vars.disks["disk"] = {
    /* No parameters. */
  }
  vars.disks["disk /"] = {
    disk_partitions = "/"
  }

  /* Define notification mail attributes for notification apply rules in `notifications.conf`. */
  vars.notification["mail"] = {
    /* The UserGroup `icingaadmins` is defined in `users.conf`. */
    groups = [ "icingaadmins" ]
  }
}

object Host "Testovaci_prostredi" {
  address = "xxx.xxx.xxx.xxx"
  check_command = "hostalive"
}
object Service "http1" {
  host_name = "Testovaci_prostredi"
  check_command = "http"
}
object Service "apt1" {
  host_name = "Testovaci_prostredi"
  check_command = "apt"
}
object Service "ssh1" {
  host_name = "Testovaci_prostredi"
  check_command = "ssh"
}
object Service "disk1" {
  import "generic-service"
  host_name = "Testovaci_prostredi"
  check_command = "disk"
}
object Service "load1" {
  host_name = "Testovaci_prostredi"
  check_command = "load"
}
object Service "users1" {
  host_name = "Testovaci_prostredi"
  check_command = "users"
}
object Service "icinga1" {
  host_name = "Testovaci_prostredi"
  check_command = "icinga"
}
object Service "testovaci.xxx.cz" {
  host_name = "Testovaci_prostredi"
  check_command = "http"
}
object Service "testovacieshop.xxx.cz" {
  host_name = "Testovaci_prostredi"
  check_command = "http"
}
object Service "testovaciwiki.xxx.cz" {
  host_name = "Testovaci_prostredi"
  check_command = "http"
}
object Service "MYSQL_databaze" {
  host_name = "Testovaci_prostredi"
  check_command = "http"
}

In Icinga2 on web I can see this (local disk):


External disk:

Please help me… :frowning:

Hi and welcome :slight_smile:

Just some quick tips for posting:

You can simply paste images into the editor and they will be uploaded and displayed in your post. No need for external image hosting :wink:

Also I would suggest you obscure your domain/employer name, just to be safe.

Config snippets can also be posted in the thread directly and encase with backticks (```)
Here is a good HowTo on posting

1 Like

I´m sorry. I will rework my post.

Now is everything alright?

1 Like

Firstly, please can you explain what your subject line “How to connect two
servers together to watch out after all?” means.

Secondly, I’m assuming you have the Icinga Agent installed on the VPS yo’re
trying to monitor - is that correct?

Finally, have you defined “command_endpoint = host.name” to make sure that the
check is performed on the VPS and not on the Icinga Master?

Antony.

1, I´m sorry, im learning with this community forum.

2, Yes, I have installed Icinga2 agent on both VPS servers. (Icinga2Web too)

3, No, I don´t defined it, I´ll try it and reply you.

Nope, it doesn´t work.

Output after I type “icinga2 daemon -C” to console.

critical/config: Error: Validation failed for object 'Testovaci_prostredi' of type 'Host'; Attribute 'command_endpoint': Object 'xxx.xxx.xxx.xxx' of type 'Endpoint' does not exist.

My zones.conf

 * Endpoint and Zone configuration for a cluster setup
 * This local example requires `NodeName` defined in
 * constants.conf.
 */

object Endpoint NodeName {
  host = NodeName
}

object Zone ZoneName {
  endpoints = [ NodeName ]
}

/*
 * Defines a global zone containing templates,
 * etc. synced to all nodes, if they accept
 * configuration. All remote nodes need
 * this zone configured too.
 */

/*
object Zone "global-templates" {
  global = true
}
*/

/*
 * Read the documentation on how to configure
 * a cluster setup with multiple zones.
 */

/*
object Endpoint "Produkce" {
  host = "xxx.xxx.xxx.xxx"
}

object Endpoint "Testovaci_prostredi" {
  host = "xxx.xxx.xxx.xxx"
}

object Zone "master" {
  endpoints = [ "Produkce" ]
}

object Zone "satellite" {
  parent = "master"
  endpoints = [ "Testovaci_prostredi" ]
}
*/ ```

All of the following are commented out (with /* and */ )

object Endpoint “Produkce”

object Endpoint “Testovaci_prostredi”

object Zone “master”

object Zone “satellite”

That means they are not defined as far as Icinga is concerned.

Antony.

I uncomment it and this write me after I want to start Icinga2.