Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
#El archivo Table-Nodes.nmis se encuentra en la carpeta /conf-default y de sebera transferir a la carpeta /conf para que los cambios sean operativos.
cp /usr/local/nmis9/conf-default/Table-Nodes.nmis /usr/local/nmis9/conf/Table-Nodes.nmis 

#Se abre el archivo para editar
vi /usr/local/nmis9/conf/Table-Nodes.nmis 

  

Codigo Código de ejemplo.

Code Block
         { community => { mandatory => 'true', header => 'SNMP Community',display => 'text',value => ["$C->{default_communityRO}"] }},
#Campos Customizados
         { country => { mandatory => 'true', header => 'Country',display => 'popup', value => ["Panama"]}},
         { latitude => {header => 'Latitude',display => 'header,text',value => [""],}},
         { longitude => {header => 'Longitude',display => 'header,text',value => [""],}},
         { address => {header => 'Address',display => 'header,text',value => [""], }},
         { bandwith => {header => 'Bandwith_Mbps',display => 'header,text',value => [""], }},
         { circuit => {header => 'Circuit_ID',display => 'header,text',value => [""], }},
         { city => {header => 'City',display => 'header,text',value => [""], }},
         { client => {header => 'Client',display => 'header,text',value => [""], }},
         { comments => {header => 'Comments',display => 'header,text',value => [""], }},
         { customer => {header => 'customer',display => 'header,text',value => [""], }},
         { media=> {header => 'Media',display => 'header,text',value => [""], }},
         { anillo=> {header => 'Anillo',display => 'header,text',value => [""], }},
         { wmi => { special=>'separator', header => "WMI Options", } },
         { wmiusername => { header => "WMI Username", display => 'text', value => [''] }},

...

Code Block
'node_summary_field_list'

 Código de ejemplo

Code Block
'node_summary_field_list' => 'host,uuid,customer,businessService,serviceStatus,snmpdown,wmidown,country,latitude,longitude,address,bandwith,circuit,city,client,comments,customern,media,anillo',


Buscar el siguiente parámetro, enseguida agregar los campos como se muestra en el ejemplo.

Code Block
'network_viewNode_field_list'

 Código de ejemplo

Code Block
'network_viewNode_field_list' => 'nodestatus,outage,sysName,host_addr,host_addr_backup,group,latitude,longitude,address,bandwith,circuit,city,client,comments,country,customer,media,location,businessService,serviceStatus,notes,nodeType,nodeModel,polling_policy,sysUpTime,sysLocation,sysContact,sysDescr,ifNumber,last_ping,last_collect,last_update,nodeVendor,sysObjectName,roleType,netType',


3.- Procedimiento para agregar los campos en opCharts

...

Buscar el siguiente parámetro, si utiliza el "vi" puede utilizar la expresión /opcharts_node_list_exporttocsv para encontrarlo de manera más ágil.

Code Block
"opcharts_node_list_exporttocsv"

 Código de ejemplo

Code Block
      "opcharts_node_list_exporttocsv" : [
         "catchall.data.name",
         "catchall.node_uuid",
         "catchall.data.active",
         "catchall.data.cbqos",
         "catchall.data.collect",
         "catchall.data.customer",
         "catchall.data.group",
         "catchall.data.host",
         "catchall.data.intfCollect",
         "catchall.data.ifNumber",
         "catchall.data.location",
         "catchall.data.model",
         "catchall.data.nodeModel",
         "catchall.data.nodeType",
         "catchall.data.nodestatus",
         "catchall.data.nodeVendor",
         "catchall.data.customern",
         "catchall.data.media",
         "catchall.data.anillo"
      ],
      "opcharts_node_selector_show_more_at" : 6,


En el mismo archivo opCommon.json se busca el Parámetro:

Code Block
"opcharts_metric_summarise_by"

 Código de ejemplo

Code Block
         "opcharts_metric_summarise_by" : [
         {
            "key" : "group",
            "name" : "Group"
         },
         {
            "name" : "Locations",
            "key" : "location"
         },
         {
            "name" : "Node Role",
            "key" : "roleType"
         },
         {
            "key" : "country",
            "name" : "Country"
         },
         {
            "key" : "latitude",
            "name" : "Latitude"
         },
         {
            "key" : "longitude",
            "name" : "Longitude"
         },
         {
            "name" : "Address",
            "key" : "address"
         },
         {
            "name" : "Bandwith_Mbps",
            "key" : "bandwith"
         },
         {
            "key" : "circuit",
            "name" : "circuit"
         },
         {
            "name" : "City",
            "key" : "city"
         },
         {
            "name" : "Client_Entry",
            "key" : "client"
         },
         {
            "name" : "Comments_Entry",
            "key" : "comments"
         },
         {
            "name" : "Customer_name",
            "key" : "customern"
         },
         {
            "name" : "Media",
            "key" : "media"
         },
         {
            "name" : "Anillo",
            "key" : "anillo"
         }
      ],
      "opcharts_gui_business_service_show_pagesize" : 0,


4.- En el archivo opCharts_node-summary-table.json se agregan los campos “Client_Entry” y “Comments_Entry”

...

Code Block
cd /usr/local/omk/lib/json/opCharts/table_schemas/
vi opCharts_node-summary-table.json

 Código de ejemplo

Code Block
[
  "group",
  "host",
  "host_addr",
  "location",
  "nodeVendor",
  "nodeModel",
  "country",
  "latitude",
  "longitude",
  "address",
  "bandwith",
  "circuit",
  "city",
  "client",
  "comments",
  "customern",
  "media",
  "anillo",
  { "name" : "sysDescr", "label": "sysDescr", "cell": "Tooltip", "formatter": "ShortenedString", "maxLength" : 48},



5.- En el archivo opCharts_node-list.json se agregan los campos “Client_Entry” y “Comments_Entry”

...

Code Block
cd /usr/local/omk/templates/reports/reports
vi report_node.html.ep

 Código de ejemplo

Code Block

                        % for my $item ('name','nodestatus','sysName','host_addr','nodeType','nodeModel','sysUpTime','ifNumber','sysLocation', 'sysContact','sysDescr','last_update','nodeVendor','sysObjectName','group','roleType','netType',Country,'Latitude','Longitude','Address','Bandwith_Mbps','Circuit_ID','City','Client_Entry','Comments_Entry','Customer_Name','Media','Anillo') {
                                <tr>
          <td class="report_primhead">


Resultados

Visualización en NMIS9

...