Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add definition of cluster_id

...

If we want to create a node in a remote cluster, we should indicate the remote cluster id in configuration.pollers: Cluster cluster_id

cluster_id is the uuid of which opHA server the node belongs to.

E.x.

Create RemotePOSThttp://host/en/omk/admin/api/v2/nodes.json

http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes.json


Code Block
{"configuration":{"pollers": "a515c63a-0d11-4bcb-a402-39a4600aebb9", "netType":"default","polling_policy":"default","port":"161","collect":1,"threshold":1,"roleType":"default","ping":1,"group":"NMIS9","host":"asgard.opmantek.net","location":null,"customer":null,"businessService":null,"notes":"","host_backup":"","active":null,"community":"","wmiusername":"","wmipassword":"","username":"","context":"","authpassword":"","authkey":"","authprotocol":null,"privpassword":"","privkey":"","privprotocol":null,"serviceStatus":null,"nettype":null,"roletype":null,"node_context_name":"","node_context_url":"","remote_connection_name":"","remote_connection_url":""},"activated":{"opEvents":"1","opConfig":"0","NMIS":"1"},"uuid":null,"current_user_privileges":{"update":true,"delete":true},"name":"test","friendly_addresses":"","friendly_aliases":""}


...

Update a remote Node

If we want to create update a node in a remote cluster, we just need to should indicate the remote cluster id in configuration.pollers: cluster_id:

cluster_id is the uuid of which opHA server the node belongs to.

E.x.

Create RemotePUThttp://host/en/omk/admin/api/v2/nodes/node_uuid.json

http://volla.opmantek.net:6042/en/omk/admin/api/v2/nodes/6ce5fd5c-d703-4d03-b36c-b8e01439a9f2.json


Code Block
{"cluster_id": "a515c63a-0d11-4bcb-a402-39a4600aebb9", "configuration":{"netType":"default","polling_policy":"default","port":"161","collect":1,"threshold":1,"roleType":"default","ping":1,"group":"NMIS9","host":"asgard.opmantek.net","location":null,"customer":null,"businessService":null,"notes":"","host_backup":"","active":null,"community":"","wmiusername":"","wmipassword":"","username":"","context":"","authpassword":"","authkey":"","authprotocol":null,"privpassword":"","privkey":"","privprotocol":null,"serviceStatus":null,"nettype":null,"roletype":null,"node_context_name":"","node_context_url":"","remote_connection_name":"","remote_connection_url":""},"activated":{"opEvents":"1","opConfig":"0","NMIS":"1"},"uuid":null,"current_user_privileges":{"update":true,"delete":true},"name":"test","friendly_addresses":"","friendly_aliases":""}


...

  • opHA needs to be pulling that peer. This is because the peer sends the API url to update the remote in the registry data. And this information should be updated at least once a day. 
  • The peer has to be online. 

If we should want to edit the remote node locally for some reason, we should use opnode_admin cli tool. 

...