You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Feature Overview

NMIS supports custom fields, or custom attributes for managed nodes.  For example; some organisations may find that a Country attribute is important to them.   Once a custom filed is provisioned in NMIS it may be extended to opCharts.

Configuration

Configure NMIS

Modify Table-Nodes.nmis

Adding a custom field to NMIS is accomplished by modifying /usr/local/nmis8/conf/Table-Nodes.nmis.  Notice that this file contains a hash with a Nodes section.  For this example we will add a Country field.  Several fields may be added if required.  Put the new field between the 'extra_options' entry and the 'advanced_options' entry.  Observe the new country field in the code block below.

/usr/local/nmis8/conf/Table-Nodes.nmis
--snip
%hash = (
        Nodes => [ # using an array for fixed order of fields
                { name => { mandatory => 'true', header => 'Name',display => 'key,header,text',value => [""] }},
                { host => { mandatory => 'true', header => 'Name/IP Address',display => 'header,text',value => [""] }},
                { group => { mandatory => 'true', header => 'Group',display => 'header,popup',value => [ @groups] }},
                { community => { mandatory => 'true', header => 'SNMP Community',display => 'text',value => ["$C->{default_communityRO}"] }},
                { extra_options => { special => 'separator', header => 'Extra Options'}},
                { country => { header => 'Country', display => 'header,text',value => [""] }},
                { netType => { header => 'Net Type', display => 'popup',value => ["wan", "lan"] }},
                { roleType => { header => 'Role Type', display => 'popup',value => ["core", "distribution", "access"] }},
                { location => { header => 'Location',display => 'header,popup',value => [ sort keys %{loadGenericTable('Locations')}] }},
                { advanced_options => { special => 'separator', header => 'Advanced Options'}},
--snip

Verify Table-Nodes.nmis

Using the NMIS GUI navigate to System -> System Configuration -> NMIS Nodes.  This should render the Table Nodes widget displaying the new field.  If it does not; restore the original Table-Nodes.nmis file and try again paying close attention to syntax.

Modify Config.nmis

Modify the node_summary_field_list list attribute in /usr/local/nmis8/conf/Config.nmis.  Add the new field key value previously added to Table-Nodes.nmis to this list.  The code block below adds the country attribute.

/usr/local/nmis8/conf/Config.nmis
 --snip
    'node_summary_field_list' => 'host,uuid,country,customer,businessService,serviceStatus,snmpdown,wmidown,remote_connection_name,remote_connection_url,host_addr',
--snip

Verify Config.nmis

No Idea !?!  What does this do?

Configure opCharts

  • No labels