|
|
This appendix lists all of the Info Gateway commands. It contains the following sections:
This section describes the Reader related commands.
START READER <reader_name> CONNECT TO <server_name> [USING FILTER <filter_name>];
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>).
START READER NCOMS_READ CONNECT TO NCOMS USING FILTER CRIT_ONLY;
STOP READER <reader_name>;
Stops the Reader named <reader_name>. This command stops the Reader when the Reader is in use with any routes.
STOP READER NCOMS_READ;
SHOW READERS;
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.
SHOW READERS;
ORDER BY [,'criteria']...;
Changes the order of events read from the Cisco Info Server. The events are ordered according to the criteria supplied.
START READER SERVER_READER CONNECT TO NAME
ORDER BY 'Severity Desc';
AFTER IDUC DO 'command';
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.
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 use a WHERE clause as the Info Gateway only updates the rows selected by the filter.
This section describes the Writer related commands.
START WRITER writer_name (TYPE=writer_type, REVISION=number [ , keyword_setting
[ , keyword_setting]... ]); 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".
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 <writer_name>;
Stops a Writer called <writer_name>. When any route is using this Writer, the Writer is not stopped.
STOP WRITER ARS_WRITER;
SHOW WRITERS;
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.
1>SHOW WRITERS;
2>GO
Name Type Routes Msgq Id Mutex Id Thread
----------- ---- ------ ------- -------- ------
SNMP_WRITER SNMP 1 15 0 0x001b8cd0
1>
SHOW WRITER TYPES;
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.
1> SHOW WRITER TYPES;2> GO
Type Revision Description------ --------- -----------------------ARS 1 Action Request System V2.0INFO_SERVER 1 Cisco Info Center ObjectServerV3.3SYBASE 1 Sybase SQL Server 10.0 RDBMSSNMP 1 SNMP Trap forwarderSERVICE_VIEW 1 Service View1>
SHOW WRITER [ATTRIBUTES | ATTR] FOR <writer_name>;
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.
1> SHOW WRITER ATTR FOR SNMP_WRITER;2> GOAttribute Value----------- ------------------MAP SNMP_MAPTYPE SNMPREVISION 1INFO GATEWAY penelope1>
This section describes the Mapping related commands.
CREATE MAPPING <mapping_name> (mapping [ , mapping ]);
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 INSERTONLY] [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.
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.
CREATE MAPPING SYBASE_MAP( 'Node'='@Node' ON INSERT ONLY, 'Summary'='@Summary' ON INSERT ONLY, 'Severity'='@Severity'); DROP MAPPING <mapping_name>;
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.
DROP MAPPING SYBASE_MAP;
SHOW MAPPINGS;
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.
1> SHOW MAPPINGS;2> GOName Writers----------------------------SNMP_MAP 11>
SHOW MAPPING [ATTRIBUTES | ATTR] FOR <mapping_name>;
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.
SHOW MAPPING ATTR FOR SYBASE_MAP;
This section describes the Filter related commands.
CREATE FILTER <filter_name> AS <filename>;
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.
CREATE FILTER HIGH_TALLY_LOG AS 'Tally > 100';
LOAD FILTER FROM 'filename';
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.
LOAD FILTER FROM '/disk/filters/newfilter.elf';
DROP FILTER <filter_name>;
Removes the filter named <filter_name> from the Info Gateway. The filter is not dropped when it is being used by a Reader.
DROP FILTER HIGH_TALLY_LOG;
This section describes the Route related commands.
ADD ROUTE FROM <reader_name> TO <writer_name>;
Adds a route between a Reader named <reader_name> to a Writer named <writer_name> to allow alerts to pass through the Info Gateway.
ADD ROUTE FROM NCOMS_READER TO ARS_WRITER;
REMOVE ROUTE FROM <reader_name> TO <writer_name>;
Removes an existing route between a Reader named <reader_name> and a Writer named <writer_name>.
REMOVE ROUTE FROM NCOMS_READER TO ARS_WRITER;
SHOW ROUTES;
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.
1> SHOW ROUTES;2> GOReader Writer---------------- ---------------------NCOMS_READER SNMP_WRITER1>
This section describes the Resynchronization related commands.
RESYNC <WRITERNAME>, <WRITERNAME> [MASTER=<WRITERNAME>] [PREFER=<WRITERNAME>];
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.
RESYNC DENCO_WRITER, NCOMS_WRITER MASTER=NCOMS_WRITER;
UNIRESYNC <READERNAME> <WRITERNAME>;
UNIRESYNC checks the contents of the two Cisco Info Servers connected through the Reader and Writer specified and, when necessary, re-synchronizes them.
UNIRESYNC DENCO_READER NCOMS_WRITER;
This section describes the Configuration related commands.
LOAD CONFIG FROM '<filename>' ;
Loads an Info Gateway configuration file from a file named in <filename>.
LOAD CONFIG FROM '/disk/config/gateconf.conf';
SAVE CONFIG TO '<filename>';
Saves the current configuration of the Info Gateway into a file named in <filename>.
SAVE CONFIG TO '/disk/config/newgate.conf';
DUMP CONFIG [FORCE];
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.
DUMP CONFIG;
This section describes the general use commands.
SHUTDOWN [FORCE];
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.
SHUTDOWN;
SET CONNECTIONS [TRUE | FALSE | YES | NO];
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.
SET CONNECTIONS TRUE;
SHOW SYSTEM;
Displays information about the current Info Gateway settings. The parameters returned are shown in 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 |
Configuration Changed | When the configuration has been changed interactively, this is |
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.
1> SHOW SYSTEM;2> GOSystem Parameter Value---------------- -------------------------------Version 3.2Server Type Info GatewayConnections ENABLEDDebug Mode NOMulti User YES
SET DEBUG MODE [TRUE | FALSE | YES | NO];
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.
SET DEBUG MODE NO;
TRANSFER '<tablename>' FROM <readername> TO <writername> [AS '<tableformat>'] [DO NOT DELETE | DELETE | DELETE condition];
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.
TRANSFER 'alerts.conversions' FROM NCO_READER TO SYBASE_WRITER AS 'alerts.conversions' DELETE;
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Thu Apr 1 10:53:06 PST 1999
Copyright 1989-1999©Cisco Systems Inc.