nv-l
[Top] [All Lists]

Tips on undocumented nvdbformat operations

To: nv-l@lists.tivoli.com
Subject: Tips on undocumented nvdbformat operations
From: "Leslie Clark" <lclark@us.ibm.com>
Date: Thu, 29 Mar 2001 07:11:04 -0500
You may have noticed that among the samples
provided in /usr/OV/conf/nvdbtools, there is one
called 'interfaces.format' that produces html.
I learned two wonderful things from studying it.
One is that we can sort and group the output of
nvdbformat. The other is that (wow) we can reference
attributes of the parent node when dealing with
interfaces! This is a very useful thing. Here
is a working example for a regular text report of down
interfaces. The 'Schoolname' field is one I added to
all nodes using nvdbimport. (That field comes in handy
for the cut/paste as well). So now I can produce a site
by site report of problems at a point in time.

The Selectrule gets me interfaces that are down.
Selectfields 1 & 2 refer to the interface. But
Selectfields 3,4,and 5 refer to attributes of the
parent node by referencing 'TopM Node ID', an
attribute of the interface that points to the node.

The numbers in the Groupby and Sortby operators refer
to sequence, not fields. So the report is grouped by
school, then there is a record for each down interface,
sorted first by device type (the SNMPAgent value of
the parent node) and secondly by device name (the Selection
Name of the parent node). The GroupHeader record appears
between Schools and includes a subtotal for that site.
The Header records appear just once at the top. Or you
might want that info on a Group Header record instead.
Tabs in the Header and Output records work reasonably well.

#########################################################
# ProblemInterfaces.format
# Invocation: nvdbformat -f ProblemInterfaces.format
#########################################################
SELECTRULE:SmartSet=ProblemInterfaces
SELECTFIELD:1:Selection Name
SELECTFIELD:2:IP Address
SELECTFIELD:3:TopM Node ID:Selection Name
SELECTFIELD:4:TopM Node ID:SNMPAgent
SELECTFIELD:5:TopM Node ID:Schoolname
#
GROUPBY:1:TopM Node ID:Schoolname
SORTBY:1:TopM Node ID:SNMPAgent
SORTBY:2:TopM Node ID:Selection Name
#
HEADER: Summary of Network Problems
HEADER:Node             Interface    IP Address      DevType
#
GROUPHEADER:School: ${GROUPNAME} ${NUMMATCH} Interfaces Down
GROUPHEADER:
OUTPUT:${3}     ${1}    ${2}    ${4}    ${5}
FOOTER:zzEnd Problem Report
#################################################################

Now, would someone please figure out how to use the delivered
'interfaces.format' to launch something like a script where that reference
to tnv-cgi-bin is? I could be really dangerous with that.

Cordially,

Leslie A. Clark
IBM Global Services - Systems Mgmt & Networking


<Prev in Thread] Current Thread [Next in Thread>
  • Tips on undocumented nvdbformat operations, Leslie Clark <=

Archive operated by Skills 1st Ltd

See also: The NetView Web