### Resume Hibernating Policies using GetHibernatingPolicies and ActivateHibernation
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=functions-activatehibernation
This example shows how to resume hibernating policies by first retrieving them using GetHibernatingPolicies with start and end action keys, and then activating the hibernation using ActivateHibernation. It requires valid action keys and a maximum number of policies to retrieve.
```javascript
// Call GetHibernatingPolicies and pass the start and end action keys
// as input parameters
StartActionKey = "ActionKeyAAAA";
EndActionKey = "ActionKeyZZZZ";
MaxNum = 1;
MyHiber = GetHibernatingPolicies(StartActionKey, EndActionKey, MaxNum);
// Call ActivateHibernation and pass the Hibernation data item as an
// input parameter
ActivateHibernation(MyHiber[0]);
```
--------------------------------
### Example: Configure Multiple Right-Click Actions for a Widget Row
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=overview-visualizing-policy-action-in-widget
This example shows a concrete implementation of the properties file for defining three distinct right-click actions. It includes actions to open a DASH page, navigate to an IBM website, and execute a policy. The example also demonstrates how to restrict actions based on a field value.
```properties
actions.numactions=3
actions.0.actiontype=dashpage
actions.0.actionname=Open Test Page Rec
actions.0.action=com.ibm.isclite.admin.Freeform.navigationElement.pagelayoutA.
modified.SXxNbLNnpq3SoBksMd6nEYw1434578685588
actions.0.restricted=true
actions.0.restricted.fieldname=COLUMN3
actions.1.actiontype=url
actions.1.actionname=Go to IBM Site
actions.1.action=http://www.ibm.com
actions.2.actiontype=policy
actions.2.actionname=Execute Test Policy
actions.2.action=TestPolicy.
```
--------------------------------
### Example Usage of nci_datasourceConfig Script
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=servers-modifying-existing-data-source-using-rest-api
Demonstrates a practical example of how to invoke the `nci_datasourceConfig.sh` script with sample parameters. This includes the admin user, password, a JSON file for payload, and the Impact server's hostname and port.
```bash
nci_datasourceConfig.sh impactadmin netcool myldap.json adminserver.mydomain.com 16311
```
--------------------------------
### Example: Unlock Files for 'impactadmin' User
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=script-unlocking-files-all-users
This is a practical example demonstrating how to unlock files specifically for the 'impactadmin' user on the 'NCI' server. It follows the syntax for unlocking files for a single user.
```bash
/opt/IBM/tivoli/impact/bin/nci_version_control NCI uncoall "impactadmin"
```
--------------------------------
### Example Policy for Topology Node Customization
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=hub-controlling-node-images-in-topology-widget
A complete policy example demonstrating how to instantiate objects, assign tree node attributes, and define custom images for various hierarchical nodes.
```Netcool/Impact Policy
Log("Customize Links");
worldObject = {};
Obj = NewObject();
Obj.Node = "World";
Obj.UITreeNodeId = 0;
Obj.UITreeNodeStatus = "Critical";
Obj.NetworkStatus = Obj.UITreeNodeStatus;
Obj.UITreeNodeLabel = "World";
Obj.LastUpdate = LocalTime(GetDate()*90);
worldObject = worldObject + Obj;
Obj2 = NewObject();
Obj2.Node = "Asia";
Obj2.UITreeNodeId = 2;
Obj2.UITreeNodeLabel = "Asia";
Obj2.UITreeNodeParent = 0;
Obj2.UITreeNodeStatus = "Major";
Obj2.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/re64_hypervisor1_8.png";
Obj2.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/re64_hypervisor1.json";
worldObject = worldObject + Obj2;
```
--------------------------------
### Add Hostname Configuration to Unattended Install Response File
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=issues-silent-install-fails-impactin0275e
This snippet shows how to add the necessary XML configuration to an unattended installation response file. This ensures the local hostname is correctly set during the installation process, preventing potential issues. No external dependencies are required for this configuration.
```xml
```
--------------------------------
### Example: Import SLO Report Package into Tivoli Common Reporting (UNIX)
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=reporting-installing-enabling-slo-report-package
This is an example of the trcmd command to import the SLO report package, showing the correct syntax with a sample file path and user credentials.
```bash
./trcmd.sh -import -bulk /tmp/ImpactSLOReportPackage.zip -user smadmin
-password password2
```
--------------------------------
### Get All Filters for a Reader
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=tools-omnibus-event-reader-commands
Retrieves a list of all configured filters for a given event reader service. This command is useful for auditing or understanding the current filter setup.
```sql
Select AllFilters from Service where Name='OMNIbusEventReader';
```
--------------------------------
### Execute Policy via OSLC URL
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=oslc-passing-argument-values-policy
An example of an HTTP GET request used to trigger a policy named 'tableset' and pass a string variable 'arg1' with the value 'table1'.
```HTTP
http://example.com:9080/NCI_NCICLUSTER_oslc/policy/tableset?arg1=table1
```
--------------------------------
### LDAP Filter for String Prefix Exclusion in IBM Tivoli Netcool Impact
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=wf-ldap-filters
This example shows an LDAP filter used to retrieve data elements where the 'location' attribute does not start with the string 'NYC'. The '!' denotes negation, and '*' acts as a wildcard for any characters following 'NYC'.
```LDAP
(!(location=NYC*))
```
--------------------------------
### Start GUI Server on UNIX and Windows
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=provider-disabling-enabling-large-data-models
Commands to initiate the GUI server process. The UNIX command supports optional authentication parameters, while the Windows command executes the batch file directly.
```bash
$IMPACT_HOME/bin/startGUIServer.sh
[-username adminuser -password adminpassword]
```
```batch
%IMPACT_HOME%\bin\startGUIServer.bat
```
--------------------------------
### Example .meta File for Display Customization
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=page-customizing-index-using-meta-files
This is an example of a .meta file used to customize the appearance and behavior of a display in IBM Tivoli Netcool Impact. It allows for setting titles, descriptions, parameters, target windows, and more. This file should be placed in the `$IMPACT_HOME/opview/displays` directory with the same base name as the display HTML file but with a `.meta` extension.
```text
title= Fancy display
description= Really nice!
parameters=cost,profit
target-window=_new
last-update=In the year 3000
graphic=/opview/assets/installed/pretty_picture.gif
hide-fields=
authorized-roles=OPVIEW_USER
```
--------------------------------
### Display Nested Policy Variables (HTTP GET)
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=syntax-nested-variables-wildcard-queries
This example demonstrates how to retrieve all variables and their nested values for a Netcool Impact policy by appending '?oslc.properties=*' to the policy URL. The output is in RDF format.
```http
http://:9080/NCICLUSTER_NCI_oslc/policy/ipl?oslc.properties=*
```
--------------------------------
### Visualizza le differenze tra due versioni di un file di configurazione
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=script-using-restorative-svn-commands
Confronta e visualizza le modifiche tra due revisioni specificate di un file di configurazione. Richiede i numeri delle due revisioni e il nome del file di configurazione.
```bash
svn diff -r :
```
--------------------------------
### Example HTTP Request Headers and Structure
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=source-creating-restful-dsa-data
Demonstrates the structure of HTTP headers and a GET request when interacting with a RESTful data source. This includes common headers like Content-Type and Max-Forwards, and shows how they are appended to the request URL.
```http
GET /api/alerts/v1 HTTP/1.1
Host: ibmnotifybm.mybluemix.net
Authorization: Basic ******************
Content-Type: application/json;charset=UTF-8
Max-Forwards: 10
```
--------------------------------
### Visualizzare certificati nel truststore con keytool
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=security-enabling-ssl-connections-external-servers
Utilizza il comando keytool con le opzioni -list e -v per visualizzare i certificati in un truststore. L'opzione -v fornisce un output più dettagliato. È necessario specificare il percorso del keystore e la sua password.
```shell
IMPACT_HOME/sdk/bin/keytool -list -v -keystore keystorefile -storepass storepass
```
```shell
/opt/IBM/tivoli/impact/sdk/bin/keytool -list -v -keystore /opt/IBM/tivoli/impact/wlp/usr/servers/NCI/resources/security/trust.jks -storepass password
```
--------------------------------
### Example OSLC Preview Variables
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=netcoolimpact-configuring-hover-previews-oslc-resources
Demonstrates the format of variables used within OSLC preview configurations. These variables are placeholders that get replaced with actual property values from the OSLC resource when the XML is generated. This allows for dynamic content in the UI previews.
```text
$RESERVATION:HOSTNAME
$RESERVATION:ID
```
--------------------------------
### Visualizza i dettagli di una revisione specifica di un file di configurazione
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=script-using-restorative-svn-commands
Recupera e visualizza il contenuto completo di una revisione specifica di un file di configurazione. Richiede il numero di revisione e il nome del file di configurazione.
```bash
svn cat -r
```
--------------------------------
### RESTfulAPIPOST Function Syntax
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=functions-restfulapipost
The RESTfulAPIPOST function is used to send resources to a RESTful API. It supports HTTP POST requests and can be configured to use a proxy server. SSL connections require specific setup as detailed in the Netcool/Impact Administration Guide.
```javascript
RESTfulAPIPOST(DataSource, Path, Config)
```
--------------------------------
### Configurazione delle proprietà del database in datasource.props
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=sources-jdbc-resultsettype-resultsetconcurrency-configuration
Configura il tipo di set di risultati e la concorrenza per un tipo di database specifico aggiungendo le proprietà richieste al file _datasource.props. Sostituire con il tipo di database desiderato e fornire i valori numerici appropriati per il tipo e la concorrenza.
```properties
impact..resultsettype=[TYPE_VALUE]
impact..resultsetconcurrency=[CONCURRENCY_VALUE]
```
```properties
# Esempio per DB2
impact.db2.resultsettype=1004
impact.db2.resultsetconcurrency=1007
```
--------------------------------
### Configure IBM Tivoli Netcool/Impact Typelist
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=overview-typelist-file
Examples demonstrating the required sequential numbering format for data type entries in the typelist file. The first example shows a valid, unbroken sequence, while the second illustrates an invalid configuration with gaps in the numbering.
```properties
impact.types.1.name=EIC_alertquery
impact.types.1.number=1
impact.types.1.class=SQL
impact.types.1.image=database.png
impact.types.2.name=EIC_PARAMETERS
impact.types.2.number=2
impact.types.2.class=SQL
impact.types.2.image=database.png
impact.types.3.name=EIC_RuleResources
impact.types.3.number=2
impact.types.3.class=SQL
impact.types.3.image=database.png
```
```properties
impact.types.1.name=EIC_alertquery
impact.types.1.number=1
impact.types.1.class=SQL
impact.types.1.image=database.png
impact.types.3.name=EIC_PARAMETERS
impact.types.3.number=2
impact.types.3.class=SQL
impact.types.3.image=database.png
impact.types.4.name=EIC_RuleResources
impact.types.4.number=2
impact.types.4.class=SQL
impact.types.4.image=database.png
```
--------------------------------
### OSLC Pop-up Preview RDF Output Example
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=netcoolimpact-configuring-hover-previews-oslc-resources
This RDF (Resource Description Framework) XML is generated when an HTTP GET request is made to an OSLC resource URL with the 'application/x-oslc-compact+xml' Accept header. It contains title, short title, and preview details for the resource.
```xml
Computer Reservation System - mycomputer.ibm.com
Reservation
31.250em
21.875em
31.250em
21.875em
```
--------------------------------
### Execute Policy with Multiple Output Parameters
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=topics-running-policies-accessing-output-parameters
Shows how to execute a policy and specify multiple output parameters using the properties query string. This is useful when a policy returns several variables that need to be exposed to the UI.
```HTTP
https://example.com:16311/ibm/tivoli/rest/providers/Impact_NCICLUSTER/datasources/IMPACT_POLICY_Test_Policy/datasets/z3_policy_variables/items?param_executePolicy=true&properties=myInteger,myString
```
--------------------------------
### Locate Derby Modification SQL Files
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=netcoolimpact-upgrading-servers-independently-minimize-downtime
This example shows how to identify SQL files that indicate potential Derby modifications required by a fix pack. Checking these files in the specified directories helps determine if services needing updated Derby schemas should be started. The paths provided are for NOI-related and MWM-related SQL files.
```shell
./add-ons/NOI/db/noi_derby_updatefpXX.sql
./install/configuration/sql/mm_windows_fpXX.sql
```
--------------------------------
### RESTfulAPIGET Function
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=functions-restfulapiget
The RESTfulAPIGET function is used to invoke resources from a RESTful API. It allows you to issue HTTP GET requests to RESTful APIs and can connect via a proxy server if enabled by the data source. SSL connections can be configured as described in the Netcool/Impact Administration Guide.
```APIDOC
## RESTfulAPIGET Function
### Description
Invokes resources from a RESTful API using HTTP GET requests. Supports connections via a proxy server and SSL configuration.
### Method
Function Call
### Endpoint
N/A (Function within Netcool/Impact)
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
None
### Request Example
```
RESTfulAPIGET(DataSource, Path, Config)
```
### Response
#### Success Response (200)
Returns the invoked resources from the RESTful API.
#### Response Example
```json
{
"example": "response body"
}
```
```
--------------------------------
### Install IBM Installation Manager Offline
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=planning-updating-installation-manager
Commands to install Installation Manager from local installation media when the system lacks internet access. Supports both root and non-root users in GUI or console modes.
```shell
# Root GUI
./install
# Root Console
./installc -acceptLicense
# Non-root GUI
./userinst
# Non-root Console
./userinstc -acceptLicense
```
--------------------------------
### Importazione del file nameserver.props su Impact 7.1
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=tbsm-adding-611-server-cluster
Questo comando viene utilizzato per importare il file nameserver.props copiato da un server TBSM 6.1.1 al server Impact 7.1. Assicurarsi che il percorso del file props sia corretto. Questo comando è disponibile sia per sistemi Windows che Linux/Unix.
```bat
IMPACT_HOME/install/nameserver/setNameServer.bat -import
```
```sh
IMPACT_HOME/install/nameserver/setNameServer.sh -import
```
--------------------------------
### Access Netcool Impact Policy Data (HTTP GET)
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=syntax-nested-variables-wildcard-queries
This example shows the URL to access a specific policy in Netcool Impact. It returns RDF data containing policy literals and resources. The server address and port should be replaced with actual values.
```http
http://:9080/NCICLUSTER_NCI_oslc/policy/ipl
```
--------------------------------
### Visualizza la cronologia delle revisioni di un file di configurazione
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=script-using-restorative-svn-commands
Visualizza un elenco di tutte le revisioni disponibili per un file di configurazione specificato. Restituisce il numero di revisione, il nome, la data/ora di creazione e il percorso del file.
```bash
svn log --verbose
```
--------------------------------
### Eseguire Politica createServiceDefinition in Netcool/Impact
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=reporting-example-slo-configuration
Istruzioni per eseguire la politica `createServiceDefinition` in Netcool/Impact tramite la GUI. La politica importa le definizioni dei servizi da un file di proprietà specificato.
```gui
Accedere alla GUI di Netcool/Impact.
Fare clic sull'icona Politiche.
Fare clic sulla politica `createServiceDefinition`.
Fare clic sul pulsante Esegui con parametri.
Immettere il percorso della directory in cui è memorizzato ServiceDefinition.props.
Fare clic su Esegui.
Fare clic su Visualizza log della politica per verificare.
```
--------------------------------
### Filter Service Logs using Java Regular Expressions
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=logs-service-log-viewer-results
Examples of Java regular expression patterns used to filter log entries in the Service Log Viewer. The first pattern matches words starting with 't', and the second demonstrates an OR condition for multiple terms.
```regex
\\bt[a-z]+\\b
```
```regex
[ OMNIbus | ITNM ]
```
--------------------------------
### Format Date/Time Strings in IBM Tivoli Netcool Impact
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=functions-localtime
This example shows how to get the current date and time in seconds using GetDate() and then format it into different string representations using LocalTime(). The formatted strings are then logged. It covers default formatting, MM/dd/yy, and HH:mm:ss formats.
```javascript
// Return date/time string using default format
Seconds = GetDate();
Time = LocalTime(Seconds);
Log(Time);
// Return date/time strings using specified formats
Seconds = GetDate();
Time = LocalTime(Seconds, "MM/dd/yy");
Log(Time);
Seconds = GetDate();
Time = LocalTime(Seconds, "HH:mm:ss");
Log(Time);
```
--------------------------------
### Check CVS Installation
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=steps-using-concurrent-versions-system-cvs
Verifies if CVS is installed on the server by executing the `cvs -v` command. The output confirms the installed version of CVS.
```shell
cvs -v
```
--------------------------------
### Create and Initialize Netcool/Impact Objects
Source: https://www.ibm.com/docs/it/tivoli-netcoolimpact/7.1.1?topic=policies-accessing-array-impact-objects-ui-data-provider
Demonstrates the instantiation of Impact objects and the assignment of string properties to them.
```IPL
MyObject1=NewObject();
MyObject1.firstname="first_name";
MyObject1.lastname="last_name";
MyObject2=NewObject();
MyObject2.city="mycity";
MyObject2.state="mystate";
```