cc/td/doc/product/rtrmgmt/info_ctr/1_0
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Info Gateway Command Reference

Info Gateway Command Reference

This appendix lists all of the Info Gateway commands. It contains the following sections:

Reader Commands

START READER

Syntax

START READER reader_name CONNECT TO server_name [ USING FILTER filter_name ] ;

Usage

Starts a Reader to be named reader_name that connects to a Cisco Info Server named server_name.

An optional filter may be applied by specifying USING FILTER followed by the name of a filter, filter_name.

Example

START READER NCOMS_READ CONNECT TO NCOMS USING FILTER CRIT_ONLY;

STOP READER

Syntax

STOP READER reader_name ;

Usage

Stops the Reader named reader_name. This command does stop the Reader when the Reader is in use with any routes.

Example

STOP READER NCOMS_READ ;

SHOW READERS

Syntax

SHOW READERS ;

Usage

Lists all the current Readers running on the Info Gateway. This command is designed for interactive use only and returns an error when used in any other circumstances.

Example

SHOW READERS;

ORDER BY

Syntax

ORDER BY [,'criteria']...;

Usage

Changes the order of events read from the Cisco Info Server. The events are ordered according to the criteria supplied.

Example

START READER SERVER_READER CONNECT TO NAME

ORDER BY 'Severity Desc';

AFTER IDUC DO

Syntax

AFTER IDUC DO 'command';

Usage

Forces the Info Gateway to perform an update in the Cisco Info Server when it places events in the Writer queue. This is used to provide feedback when events pass through an Info Gateway.

Example

START READER NCOMS_READER CONNECT TO NCOMS USING FILTER MY_FILTER
ORDER BY 'SERIAL ASC' AFTER IDUC DO 'update alerts.status set Grade=2';

This example uses the Grade field as a state field. Initially, all Info Mediators set this field to Grade=0. The Info Gateway filters any events that have a Grade=1. After the events have passed through the Info Gateway, the IDUC command provides event state feedback by changing the Grade field to Grade=2.

Note, you need not to use a WHERE clause, the Info Gateway only updates the rows selected by the filter.

Writer Commands

START WRITER

Syntax

START WRITER writer_name ( TYPE=writer_type , REVISION=number [ , keyword_setting

[ , keyword_setting ]... ] ) ;

Usage

Starts a Writer to be named writer_name. This is followed by a set of comma separated keyword settings. The keyword settings must start with a TYPE setting followed by a writer_type. This should be followed by a comma. Following this should be a REVISION setting (which is currently 1). For more information about the Writer types currently available, see Chapter 6, "Using Info Gateways".

Example

The example shown starts a Writer for Remedy ARS (Action Request System):

START WRITER ARS_WRITER
(
TYPE = ARS,
REVISION = 1,
MAP = ARS_MAP,
SERVER = 'orac',
SCHEMA = 'Omnibus 3.1',
USER = 'Demo',
PASSWORD = '',
FEEDBACK = TRUE,
FEEDBACK_SERVER = NCOMS,
FEEDBACK_FIELD = 'Location'
);

STOP WRITER

Syntax

STOP WRITER writer_name ;

Usage

Stops a Writer called writer_name. When any route is using this Writer, the Writer is not stopped.

Example

STOP WRITER ARS_WRITER;

SHOW WRITERS

Syntax

SHOW WRITERS ;

Usage

Lists all current Writers in the Info Gateway. This command is designed for interactive use only and returns an error when used in any other circumstances.

Example

1>SHOW WRITERS ;

2>GO

Name        Type Routes Msgq Id Mutex Id Thread

----------- ---- ------ ------- -------- ------

SNMP_WRITER SNMP 1      15      0        0x001b8cd0

1>

SHOW WRITER TYPES

Syntax

SHOW WRITER TYPES ;

Usage

Lists all the currently known types of Writers supported by the Info Gateway. This command is for interactive use only and returns an error when used in any other circumstances.

Example

      1> SHOW WRITER TYPES;
      2> GO
       
      
Type	Revision		Description                                                                      
------	---------		----------------------- 
ARS	1		 Action Request System V2.0                                                       
INFO_SERVER	1		Cisco Info Center ObjectServerV3.3 
SYBASE	1		Sybase SQL Server 10.0 RDBMS                                                     
SNMP	1		SNMP Trap forwarder 
SERVICE_VIEW	1		Service View
 
1> 

SHOW WRITER ATTRIBUTES

Syntax

SHOW WRITER [ ATTRIBUTES | ATTR ] FOR writer_name ;

Usage

Shows all the settings (attributes) of the Writer named writer_name. The ATTRIBUTES keyword is interchangeable with the shorter ATTR keyword. This command is designed for interactive use only and returns an error when used in any other circumstances.

Example

1> SHOW WRITER ATTR FOR SNMP_WRITER;
2> GO
Attribute	Value 
-----------	------------------
MAP	SNMP_MAP                                                                                                                                                                                                                                                        
TYPE	SNMP                                                                                                                                                                                                                                                            
REVISION	1                                                                                                                                                                                                                                                               
INFO GATEWAY	penelope                                                                                                                                                                                                                                                        
 
1> 

Mapping Commands

CREATE MAPPING

Syntax

CREATE MAPPING mapping_name ( mapping [ , mapping ] );

Usage

Creates a mapping file to be named mapping_name for use by a Writer.

Mapping lines have the following syntax:

[ string | integer ] = [ string | integer | name | real | boolean ] [ ON INSERT
ONLY ][ CONVERT TO [ INT | STRING | DATE ]

Where the first argument is an identifier for the destination field and the second argument is an identifier for the source field (or some preset value).

The right hand side of the mapping is dependent on the Writer the mapping is to be used with. See the appropriate Writer section in this manual.

ON INSERT ONLY adjusts the update behavior of the mapping. Without the ON INSERT ONLY tag, the field is updated every time a change is registered on an alert. With the ON INSERT ONLY tag, the field is written to at creation time (that is, when the alert appears for the first time), however, it is not updated on subsequent updates of the alert even when the field referred to is changed.

The optional CONVERT TO type allows the mapping to define a forced conversion for situations where a source field may not match the type of the destination field. Type can be INTEGER, STRING, or DATE to force the source field to be converted to an integer, string, or date type.

Example

CREATE MAPPING SYBASE_MAP
(
'Node'='@Node' ON INSERT ONLY,
'Summary'='@Summary' ON INSERT ONLY,
'Severity'='@Severity'
);

DROP MAPPING

Syntax

DROP MAPPING mapping_name ;

Usage

Removes the mapping named mapping_name from the Info Gateway. This command does not drop the map when it is being used by a Writer.

Example

DROP MAPPING SYBASE_MAP ;

SHOW MAPPINGS

Syntax

SHOW MAPPINGS ;

Usage

Lists all the mappings currently created within the Info Gateway. This command is designed for interactive use only and returns an error when used in any other circumstances.

Example

1> SHOW MAPPINGS;
2> GO
Name 	Writers 
---------------------------- 
SNMP_MAP			1
 
1> 

SHOW MAPPING ATTRIBUTES

Syntax

SHOW MAPPING [ ATTRIBUTES | ATTR ] FOR mapping_name ;

Usage

Shows the mappings (attributes) of the mapping named mapping_name. The ATTRIBUTES keyword is interchangeable with the shorter ATTR keyword. This command is designed for interactive use only and returns an error when used in any other circumstances.

Example

SHOW MAPPING ATTR FOR SYBASE_MAP ;

Filter Commands

CREATE FILTER

Syntax

CREATE FILTER filter_name AS filename ;

Usage

Creates a filter for use by a Reader that is named filter_name. The filter uses filename as its filter specification. The filename should be the expression part of a Cisco Info Server SQL statement.

Example

CREATE FILTER HIGH_TALLY_LOG AS 'Tally > 100' ;

LOAD FILTER

Syntax

LOAD FILTER FROM 'filename' ;

Usage

Loads a filter (a .elf file as created by the Filter Builder) from a file. The name of the filter is the name specified in the Filter Builder field.

Example

LOAD FILTER FROM '/disk/filters/newfilter.elf' ;

DROP FILTER

Syntax

DROP FILTER filter_name ;

Usage

Removes the filter named filter_name from the Info Gateway. The filter is not dropped when it is being used by a Reader.

Example

DROP FILTER HIGH_TALLY_LOG ;

Route Commands

ADD ROUTE

Syntax

ADD ROUTE FROM reader_name TO writer_name ;

Usage

Adds a route between a Reader named reader_name to a Writer named writer_name to allow alerts to pass through the Info Gateway.

Example

ADD ROUTE FROM NCOMS_READER TO ARS_WRITER ;

REMOVE ROUTE

Syntax

REMOVE ROUTE FROM reader_name TO writer_name ;

Usage

Removes an existing route between a Reader named reader_name and a Writer named writer_name.

Example

REMOVE ROUTE FROM NCOMS_READER TO ARS_WRITER ;

SHOW ROUTES

Syntax

SHOW ROUTES ;

Usage

Shows all currently configured routes within the Info Gateway. This command is designed for interactive use only and returns an error when used in any other circumstances.

Example

1> SHOW ROUTES;
2> GO
Reader	Writer                           
----------------	--------------------- 
NCOMS_READER		SNMP_WRITER                      
 
1> 

Resynchronization Commands

RESYNC

Syntax

RESYNC WRITERNAME, WRITERNAME [MASTER=WRITERNAME] [PREFER=WRITERNAME];

Usage

Resynchronizes a bidirectional Info Gateway. You must supply the names of the two Cisco Info Server Writers in your bidirectional Info Gateway, however, the MASTER and PREFER parameters are optional.

When you do not specify a MASTER or PREFER parameter, the RESYNC command checks the two Cisco Info Servers and works out which has been running for the longest. This Cisco Info Server becomes the master, the other becomes the slave. The command then deletes the contents of the slave Cisco Info Server and populates it with the contents of the master Cisco Info Server.

When you know which Cisco Info Server has been running for the longest, you can use the optional MASTER parameter to specify it as the master server.

Example

RESYNC DENCO_WRITER, NCOMS_WRITER MASTER=NCOMS_WRITER;

UNIRESYNC

Syntax

UNIRESYNC READERNAME WRITERNAME;

Usage

UNIRESYNC checks the contents of the two Cisco Info Servers connected through the Reader and Writer specified and, when necessary, re-synchronizes them.

Example

UNIRESYNC DENCO_READER NCOMS_WRITER;

Configuration Commands

LOAD CONFIG

Syntax

LOAD CONFIG FROM 'filename' ;

Usage

Loads an Info Gateway configuration file from a file named in filename.

Example

LOAD CONFIG FROM '/disk/config/gateconf.conf';

SAVE CONFIG

Syntax

SAVE CONFIG TO 'filename' ;

Usage

Saves the current configuration of the Info Gateway into a file named in filename.

Example

SAVE CONFIG TO '/disk/config/newgate.conf';

DUMP CONFIG

Syntax

DUMP CONFIG [ FORCE ] ;

Usage

Clears the current configuration. When the Info Gateway is active and transferring alerts, this command does not clear the configuration unless the optional keyword FORCE is used.

Example

DUMP CONFIG ;

General Commands

SHUTDOWN

Syntax

SHUTDOWN [ FORCE ] ;

Usage

Sets the Info Gateway to shutdown; all Readers and Writers are stopped. This command does not shut down the Info Gateway when interactive changes to the configuration have not been saved. See Section, "SHOW SYSTEM", for details on how to determine when the configuration has been changed interactively). The optional FORCE keyword overrides that behavior and shuts down the Info Gateway, even when the configuration has been changed interactively.

Example

SHUTDOWN ;

SET CONNECTIONS

Syntax

SET CONNECTIONS [ TRUE | FALSE | YES | NO ] ;

Usage

Sets the availability of interactive connections to the Info Gateway. Setting to FALSE or NO disables the facility to log in to the Info Gateway with nco_sql. Setting to TRUE or YES enables that facility. This command is provided to allow a configuration file to lock the Info Gateway from interactive reconfiguration.

Example

SET CONNECTIONS TRUE ;

SHOW SYSTEM

Syntax

SHOW SYSTEM ;

Usage

Displays information about the current Info Gateway settings. The parameters returned are:


Table H-1:
System Parameter Description

Version

Version number of the Info Gateway.

Server Type

Type of server - should be Info Gateway.

Connections

Status of the SET CONNECTIONS flag (see Section, "SET CONNECTIONS").

Debug Mode

Status of the SET DEBUG MODE flag (see Section, "SET DEBUG MODE").

Multi User

Info Gateway multi-user mode - should be YES.

Configuration Changed

When the configuration has been changed interactively, this is YES.

Show System Parameters

More parameters may be returned when in debug mode. This command is designed for interactive use only and returns an error when used in any other circumstances.

Example

1> SHOW SYSTEM ;
2> GO
System Parameter		Value                            
---------------- 	-------------------------------- 
Version 								3.2 
Server Type 		Info 	Gateway
Connections 		ENABLED
Debug Mode 		NO
Multi User 		YES

SET DEBUG MODE

Syntax

SET DEBUG MODE [ TRUE | FALSE | YES | NO ] ;

Usage

Sets the debugging mode of the Info Gateway. Setting to TRUE or YES enables debugging messages to be sent to the log file. Default setting for this is NO or FALSE. This command should only be used under the advice of technical support for problem determination.

Example

SET DEBUG MODE NO ;

TRANSFER

Syntax

TRANSFER 'tablename' FROM readername TO writername [AS 'tableformat']
[DO NOT DELETE | DELETE | DELETE condition] ;

Usage

Transfers the contents of one database table to another database table. You can use this command to transfer tables between Sybase, Oracle, Informix, and Cisco Info Server tables.

The tableformat variable specifies the format of the destination table when it is different from the source table format. The optional DO NOT DELETE and DELETE parameters define how the destination table is processed. When DELETE is specified, the contents of the destination table is deleted before the contents of the source table are transferred. When DO NOT DELETE is specified, the contents of the destination server are not deleted before the contents of the source table are transferred.

Example

TRANSFER 'alerts.conversions' FROM NCO_READER TO SYBASE_WRITER AS 'alerts.conversions' DELETE;


hometocprevnextglossaryfeedbacksearchhelp
Posted: Wed Mar 24 13:45:04 PST 1999
Copyright 1989-1999©Cisco Systems Inc.