AIOps

 View Only

Cloud Pak for AIOps 4 tips: auto-start for the Netcool components

By Zane Bray posted 3 hours ago

  

In any deployment of IBM Cloud Pak for AIOps (AIOps), there will likely be some needed Netcool assets. For example, if one of your event sources is traps or syslogs, then you'll probably need a Netcool/Probe for SNMP or Syslog/Syslogd respectively. Similarly, if you need to integrate with some proprietary third-party API for event enrichment, you'll likely need Netcool/Impact. These Netcool assets do what they do very well, and are an ideal and seamless part of any AIOps deployment.

In a production deployment, it is best practice to deploy Netcool components to automatically start when the VM they're hosted on boots up. This blog gives an overview of how to do that for both Netcool/OMNIbus and Netcool/Impact on a Linux system using systemd.

NOTE: These steps assume Netcool/OMNIbus and Netcool/Impact have been installed as the netcool user, who is a member of the ncoadmin group.

Netcool/OMNIbus

NETCOOL PROCESS AGENT

After you have configured your ObjectServers, Gateways, and Probes and tested them to ensure they come up and run correctly, the next step is configure the Netcool Process Agent to start and manage the various processes. The Netcool Process Agent is a valuable utility that monitors and manages core Netcool/OMNIbus components and restarts them should they fail. This might be, for example, when a Probe or Gateway fails to connect to a target and so shuts down as part of its normal running. The Netcool Process Agent will detect this shutdown and attempt to restart it, according to the specifications in the configuration file.

The Netcool Process Agent is configured via its configuration file. The default template is provided in:

$OMNIHOME/etc/nco_pa.conf

A sample Netcool Process Agent file to start an ObjectServer and then a Simnet Probe is provided below.

Example Netcool Process Agent configuration file:

nco_process 'AGG_P'
{
Command '$OMNIHOME/bin/nco_objserv -name AGG_P -pa NCO_PA' run as 1000
Host = 'kea1.fyre.ibm.com'
Managed = True
RestartMsg = '${NAME} running as ${EUID} has been restored on ${HOST}.'
AlertMsg = '${NAME} running as ${EUID} has died on ${HOST}.'
RetryCount = 0
ProcessType = PaPA_AWARE
}
nco_process 'SimnetProbe'
{
Command '$OMNIHOME/probes/nco_p_simnet -server AGG_P' run as 1000
Host = 'kea1.fyre.ibm.com'
Managed = True
RestartMsg = '${NAME} running as ${EUID} has been restored on ${HOST}.'
AlertMsg = '${NAME} running as ${EUID} has died on ${HOST}.'
RetryCount = 0
ProcessType = PaPA_AWARE
}
nco_service 'Core'
{
ServiceType = Master
ServiceStart = Auto
process 'AGG_P' NONE
process 'SimnetProbe' 10
}
nco_service 'InactiveProcesses'
{
ServiceType = Non-Master
ServiceStart = Non-Auto
}
nco_routing
{
host 'kea1.fyre.ibm.com' 'NCO_PA' 'netcool' 'ECEDBJAGFKBIGD'
}

NOTES:

  • Take a backup of the default nco_pa.conf file before editing it
  • Processes should generally be run as a non-root user
  • The Simnet Probe in the example above starts 10 seconds after the ObjectServer, giving it time to start first

INSTALL STARTUP SCRIPTS

After you have successfully tested that your Netcool Process Agent starts correctly and brings up the components under its control, the last step is to run the startup utility that installs the systemd script. This should be run as the root user so that the needed systemd start-up file can be created. For Linux, the command to do this would be:

# $NCHOME/omnibus/install/startup/linux2x86install

This creates a startup script which starts the Netcool Process Agent in the following location:

/etc/systemd/system/nco.service

A sample systemd startup script is provided below:

[Unit]
Description=Netcool/OMNIbus
After=network.target

[Service]
Environment="NCHOME=/opt/IBM/tivoli/netcool" "OMNIHOME=$NCHOME/omnibus"
ExecStart=/opt/IBM/tivoli/netcool/omnibus/bin/nco_pad -name NCO_PA -authenticate none  -nodaemon
KillMode=control-group
Type=simple
PIDFile=/opt/IBM/tivoli/netcool/omnibus/var/NCO_PA.pid

[Install]
WantedBy=default.target

To configure this startup script to run automatically when the system boots, execute the following commands as the system root user:

# systemctl enable nco.service
# systemctl daemon-reload

Documentation link: https://www.ibm.com/docs/en/netcoolomnibus/8.1?topic=system-automatically-starting-process-agents-unix

Netcool/Impact

Netcool/Impact is made up of two main processes: the Netcool/Impact server and the Netcool/Impact GUI server. Typically both of these would need to be automatically started on a Linux server at machine boot.

A sample systemd startup script for the Netcool/Impact server process would be:

[Unit]
Description=Netcool/Impact
After=network.target

[Service]
Type=forking
User=netcool
Group=ncoadmin
WorkingDirectory=/opt/IBM/tivoli/impact/bin
Environment="IMPACT_HOME=/opt/IBM/tivoli/impact"
ExecStart=/bin/bash -c '/opt/IBM/tivoli/impact/bin/startImpactServer.sh'
ExecStop=/bin/bash -c '/opt/IBM/tivoli/impact/bin/stopImpactServer.sh'

[Install]
WantedBy=multi-user.target

This file should be created by the system root user in the following location:

/etc/systemd/system/nci.service

To configure this startup script to run automatically when the system boots, execute the following commands as the system root user:

# systemctl enable nci.service
# systemctl daemon-reload

A sample systemd startup script for the Netcool/Impact GUI server process would be:

[Unit]
Description=Netcool/Impact
After=network.target

[Service]
Type=forking
User=netcool
Group=ncoadmin
WorkingDirectory=/opt/IBM/tivoli/impact/bin
Environment="IMPACT_HOME=/opt/IBM/tivoli/impact"
ExecStart=/bin/bash -c '/opt/IBM/tivoli/impact/bin/startGUIServer.sh'
ExecStop=/bin/bash -c '/opt/IBM/tivoli/impact/bin/stopGUIServer.sh'

[Install]
WantedBy=multi-user.target

This file should be created by the system root user in the following location:

/etc/systemd/system/ncigui.service

To configure this startup script to run automatically when the system boots, execute the following commands as the system root user:

# systemctl enable ncigui.service
# systemctl daemon-reload

Documentation link: https://www.ibm.com/docs/en/tivoli-netcoolimpact/7.1?topic=steps-installing-uninstalling-netcool-impact-auto-start-unixlinux

For Netcool Best Practices documents, follow this link: https://ibm.biz/nco_bps

0 comments
10 views

Permalink