nci_trigger
You can use the nci_trigger tool to run a policy from the command line.
This tool is in the $IMPACT_HOME/bin
directory.
To run this tool, use the following syntax
nci_trigger [-version] | server_name [ user_id | user_id/password |
-e/user_id/encrypted_password | NULL ] policy_name field value field value ...
NULL
when you run the command.nci_trigger
. So in a cluster, you cannot run nci_trigger
on the primary system to run a policy on the secondary, you must run
nci_trigger
on the secondary to do that.These are the command line arguments for nci_trigger
:
server_name
- Instance of the Impact Server where you want the policy to run.
user_id/password
- Username and password of a valid user who has access to Netcool®/Impact.
-e/user_id/encrypted_password
- Username and encrypted password of a valid user who has access
to Netcool/Impact.
You can use the
nci_crypt
tool to encrypt passwords. policy_name
- Name of the policy to run.
field
- Name of a field in the event container that is passed to the policy. Optional.
value
- Value of a field in the event container that is passed to the policy. Optional.
Identifier
and Serial
fields
in the event container that is passed to policy.Runtime parameters
The following example
shows how to pass runtime parameters to a policy, using nci_trigger.
In this example, the policy is named POLICY_01
Log(EventContainer.Value1);
Log(EventContainer.Value2);
To use the nci_trigger tool to run this policy , you can enter the following at a command prompt:
nci_trigger NCI impactadmin/netcool POLICY_01 Value1 Testing1 Value2 Testing2
This statement prints the following to the policy log:
Testing1
Testing2
Examples
This example shows how to run a simple policy from
the command line that does not process an incoming event. In this
example, the policy is named POLICY_01
, the user
is impactadmin
, the
password is netcool
and the server instance is NCI
.
nci_trigger NCI impactadmin/netcool POLICY_01
This
example shows how to run a policy using an encrypted password. In
this example, the password was previously encrypted using the nci_crypt
tool.
nci_trigger NCI_02 -e/impactadmin/06783FB2EBEFA493D019565DA72B4D4C POLICY_02
This example shows how to run a policy and pass event field values to the policy as the contents of an incoming event container.
nci_trigger NCI impactadmin/netcool POLICY_03 Node host_01 Summary Node_down
AlertKey host_01Node_down