Child pages
  • Opmantek System Configuration
Skip to end of metadata
Go to start of metadata

Introduction

Opmantek System Configuration is a new admin tool to edit all the NMIS and Opmantek configuration and to manage all nodes from an unified and centralised easy to use GUI. 


This is available under the following link:


In a opHA environment, it is also possible to manage remote nodes. Even relocate the nodes from one poller to another. 

URL

http://myserver.domain.com/en/omk/admin

Custom role types


If we have custom net types, nodes or custom role types in any poller, we also add this types into our nmis configuration file (nmis9/conf/Config.nmis) in the master: 

"roletype_list" => "default,core,distribution,access",
"nettype_list" => "default,wan,lan,vpn,man,san,voice",
"nodetype_list" => "default,generic,switch,router,firewall,server",


Nodes API 

We can also manage the nodes using the API. 

OperationMethodURLExample
Get nodesGEThttp://host/en/omk/admin/api/v2/nodes.jsonhttp://uburnto.opmantek.net/en/omk/admin/api/v2/nodes.json?requestData=undefined&page=1&per_page=25&sort_by=name&order=asc
Get NodeGEThttp://host/en/omk/admin/api/v2/nodes/{node_uuid}http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes/86a82b4c-6ef6-4691-8c8c-1fc8da334d6f.json
Create NodePOSThttp://host/en/omk/admin/api/v2/nodes

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

{"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":""}
Update NodePUThttp://host/en/omk/admin/api/v2/nodes/{node_uuid}

http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes/b56ba595-69e7-4702-9fe5-49512e1340b0

{"configuration":{"netType":"default","polling_policy":"1_minute","port":"161","collect":1,"threshold":1,"roleType":"access","ping":1,"group":"EXSI","active":1,"addresses":["192.168.88.13"],"aliases":[],"authkey":"","authpassword":"","authprotocol":"md5","businessService":null,"cbqos":"none","community":"OMKRead","context":"","customer":"Opmantek","depend":[],"display_name":"","host":"castor.opmantek.net","host_backup":"","ip_protocol":"IPv4","location":"Cloud","max_msg_size":1472,"max_repetitions":0,"model":"automatic","node_context_name":"Node Context","node_context_url":"https://somelink.com/map/thing/","notes":"","privkey":"","privpassword":"","privprotocol":"des","remote_connection_name":"SSH to Node","remote_connection_url":"ssh://$host","serviceStatus":"Testing","services":[],"sysDescr":"VMware ESXi 6.7.0 build-17167734 VMware, Inc. x86_64","timezone":0,"username":"","version":"snmpv2c","webserver":0,"wmipassword":"","wmiusername":"","nettype":null,"roletype":null},"activated":{"opEvents":"1","opConfig":"0","NMIS":"1"},"uuid":"b56ba595-69e7-4702-9fe5-49512e1340b0","current_user_privileges":{"update":0,"delete":0},"addresses":[],"aliases":[],"cluster_id":"a515c63a-0d11-4bcb-a402-39a4600aebb9","friendly_addresses":"192.168.88.13","friendly_aliases":"","name":"Castor","node_local":"Remote","overrides":{},"server_name":"fulla","unknown":{}}
Delete NodeDELETEhttp://host/en/omk/admin/api/v2/nodes/{node_uuid}http://uburnto.opmantek.net/en/omk/admin/api/v2/nodes/b56ba595-69e7-4702-9fe5-49512e1340b0

Important: All this methods are authenticated. 

OperationMethodURLExample
AuthenticatePOSThttp://host/en/omk/admin/login

http://uburnto.opmantek.net/en/omk/opHA/login

{"username": "username",
"password": "password"}

We should receive a 200 response and a cookie, that we can reuse for next API calls. 

Remote Nodes 

If any operation has a remote cluster id, the API will try to edit in the remote server. If this operation is not possible, it will fail. 

In order to succeed: 

  • 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 edit the remote node locally for some reason, we should use opnode_admin cli tool. 


  • No labels