...
In this example we are using "device_ci" as the name of our custom field and "Device CI" as the label to be displayed in the screens.
NOTE: Telmex uses just "ci" so the info below has been changed to just use "ci"
1) Add the custom field to NMIS
...
Code Block |
---|
language | perl |
---|
title | /usr/local/nmis9/conf-default/Table-Nodes.nmis |
---|
|
{ device_ci => { header => 'Device CI', display => 'header,text',value => [""] }}, |
...
Code Block |
---|
language | perl |
---|
title | /usr/local/nmis9/conf/Config.nmis |
---|
|
'node_summary_field_list' => 'host,uuid,customer,device_ci,businessService,serviceStatus,snmpdown,wmidown', |
...
Code Block |
---|
language | perl |
---|
title | /usr/local/nmis9/conf/Config.nmis |
---|
|
'custom_indices' => {
'nodes' => [
[ {'configuration.device_ci' => 1}, { unique => 1, partialFilterExpression => { "configuration.device_ci" => { '$exists' => true } } }]
]
} |
...
Code Block |
---|
title | /usr/local/omk/lib/json/admin/table_schemas/admin_node-ip.json |
---|
|
{
"name": "nodes.configuration.device_ci",
"label": "Device CI",
"cell": "String",
"editable": false,
"search": "iregex"
} |
...
Code Block |
---|
title | /usr/local/omk/lib/json/opCharts/table_schemas/opCharts_node-list.json |
---|
|
{
"name": "nodes.configuration.device_ci",
"label": "Device CI",
"cell": "String",
"editable": false,
"search": "iregex"
} |
...
Code Block |
---|
title | /usr/local/omk/conf/form_schemas/admin_nodes.json |
---|
|
{"label": "Device Ci",
"description": "Edit in conf/form_schemas/admin_nodes.json",
"component": ["node_admin"],
"tags": ["node"],
"schema": {
"configuration.device_ci": {
"title": "Device CI",
"type": "Text"}
}} |
...
Code Block |
---|
title | /usr/local/omk/lib/json/opCharts/table_schemas/opCharts_node-summary-table.json |
---|
|
// VERSION=1.518.0
[
"group",
"host",
"host_addr",
"location",
"nodeVendor",
"nodeModel",
{ "name" : "device_ci", "label": "Device CI", "cell": "String"},
{ "name" : "sysDescr", "label": "sysDescr", "cell": "Tooltip", "formatter": "ShortenedString", "maxLength" : 48},
{ "name" : "lastUpdateSec", "label" : "Last Updated", "cell" : "String", "formatter" : "UnixTime"},
{ "name" : "sysUpTimeSec", "label" : "Uptime", "cell" : "String", "formatter" : "UpTime"},
{ "name" : "remote", "label" : "Managed by"}
] |
...