Wednesday, October 3, 2018

vmware workstation pro 12

license key for vmware workstation pro 12

IBM one
1H43J-DKH5P-08V9C-0J8AM-0J8NN

Dan's
JJ09P-6KK50-48V64-0U8RP-CNV65  (either v10 or v12)

Friday, September 14, 2018

DASH Cumulative fix Packs

https://www.ibm.com/developerworks/community/wikis/home?lang=en-us#!/wiki/W8b1151be2b42_4819_998e_f7de7db7bfa2/page/Download%20Cumulative%20Patches%20-%20UI%20Services%20(DASH)

https://developer.ibm.com/answers/questions/290614/how-to-check-jazzsmdash-cumulative-patch-version/

Checking DASH version
$ cd /opt/ibm/tivoli/netcool/JazzSM/ui/bin
$ ./consolecli.sh Version
Dashboard Application Services Hub version: 3.1.3.0-201606061247-201709141353
Charting version: dash_prod-201606061247

CTGWA4017I The command completed successfully.


JazzSM versions installed

cd /opt/ibm/tivoli/netcool/JazzSM/properties/version

$ ls
Jazz_for_Service_Management-1.1.0.1.fxtag
Jazz_for_Service_Management-1.1.0.2.fxtag
Jazz_for_Service_Management-1.1.0.3.fxtag
Jazz_for_Service_Management-1.1.0.swtag
Jazz_for_Service_Management-1.1.1.swtag
Jazz_for_Service_Management-1.1.2.1.fxtag
Jazz_for_Service_Management-1.1.2.swtag
Jazz_for_Service_Management-1.1.3.swtag
Jazz_for_Service_Management_Dashboard_Application_Services_Hub-3.1.0.1.fxtag
Jazz_for_Service_Management_Dashboard_Application_Services_Hub-3.1.0.2.fxtag
Jazz_for_Service_Management_Dashboard_Application_Services_Hub-3.1.0.3.fxtag
Jazz_for_Service_Management_Dashboard_Application_Services_Hub-3.1.0.cmptag
Jazz_for_Service_Management_Dashboard_Application_Services_Hub-3.1.1.cmptag
Jazz_for_Service_Management_Dashboard_Application_Services_Hub-3.1.2.1.fxtag
Jazz_for_Service_Management_Dashboard_Application_Services_Hub-3.1.2.cmptag
Jazz_for_Service_Management_Dashboard_Application_Services_Hub-3.1.3.cmptag


$ cd/opt/ibm/tivoli/netcool/IM188/eclipse/tools
$ ./imcl listInstalledPackages -features -long
/appl/esm/tivoli/netcool/IM188/eclipse : com.ibm.cic.agent_1.8.8000.20171130_1105 : IBM® Installation Manager : 1.8.8 :
/appl/esm/tivoli/netcool/WebSphere/AppServer : com.ibm.tivoli.tacct.psc.install.was85.extension_1.1.2001.20160606-1749 : Jazz for Service Management extension for IBM WebSphere 8.5 : 1.1.2.1 :
/appl/esm/tivoli/netcool/WebSphere/AppServer : com.ibm.websphere.BASE.v85_8.5.5009.20160225_0435 : IBM WebSphere Application Server : 8.5.5.9 : com.ibm.sdk.6_64bit,ejbdeploy,embeddablecontainer,thinclient
/appl/esm/tivoli/netcool/WebSphere/AppServer : com.ibm.websphere.IBMJAVA.v70_7.0.9030.20160224_1826 : IBM WebSphere SDK Java Technology Edition (Optional) : 7.0.9.30 :
/appl/esm/tivoli/netcool/JazzSM : com.ibm.tivoli.tacct.psc.tip.install_3.1.3000.20160606-1749 : IBM Dashboard Application Services Hub : 3.1.3.0 : com.ibm.tivoli.tacct.psc.install.server.feature.tip.config
/appl/esm/tivoli/netcool/gui : com.ibm.tivoli.netcool.itnm.gui_4.2.4.20180404_2022 : Network Manager GUI Components : 4.2.0.5 :
/appl/esm/tivoli/netcool/gui : com.ibm.tivoli.netcool.omnibus.webgui_8.1.12.201712140056 : IBM Tivoli Netcool/OMNIbus Web GUI : 8.1.0.12 : WebGUI.feature


[netcool@pgv01222e tools]$ cd /opt/ibm/tivoli/netcool/JazzSM/ui/bin/
[netcool@pgv01222e bin]$
[netcool@pgv01222e bin]$
[netcool@pgv01222e bin]$ ./consolecli.sh SystemInfo --outputFile /tmp/dashinfo
CTGWA4017I The command completed successfully.


Wednesday, September 12, 2018

Oracle SQLPlus commands

/appl/oracle/app/oracle/product/12.1.0/client_1/bin/sqlplus ncim/ncim@pgv012265:20001/NCIMP_APP.oradb.albertsons.com


./sqlplus reporter/reporter@pgv012266:20001/HISTNCP_APP.oradb.albertsons.com







Tuesday, September 11, 2018

ITNM poller not running as root after set_uid script

Had an issue at customer where the ICMP poller was not running and below warning messages are seen in the log file

2018-09-11T14:37:28: Information: I-MOM-001-013: [641210176t] Connected to broker: 127.0.0.1:1883 using clientId: ncp_poller_4098_BACKSTAGE_P
2018-09-11T14:37:28: Information: I-MOM-001-001: [641210176t] ncp_poller[4098] Version 4.2 (Build 60) 64 bit on linux2x86 becoming Primary
2018-09-11T14:37:28: Information: I-DB-001-018: [328492800t] Polling thread: Database poller is connected to NCIM database 'NCIMP_APP.oradb.albertsons.com' (schema 'ncim')
2018-09-11T14:37:28: Information: I-POL-001-003: [326391552t] Opening plugin SnmpPoller: library name is /appl/esm/tivoli/netcool/precision/precision/platform/linux2x86/lib64/libNcpSnmpPoller.so
2018-09-11T14:37:28: Warning: W-SNM-003-012: [326391552t] Cannot create raw IPv4 socket (error = 1)
2018-09-11T14:37:28: Warning: W-SNM-003-009: [326391552t] Error 1: Operation not permitted
2018-09-11T14:37:28: Warning: W-SNM-003-013: [326391552t] ICMPv4 will be disabled
2018-09-11T14:37:28: Information: I-POL-001-003: [326391552t] Opening plugin Monitor: library name is /appl/esm/tivoli/netcool/precision/precision/platform/linux2x86/lib64/libNcpMonitor.so
2018-09-11T14:37:30: Information: I-DB-001-018: [80545536t] Polling thread: Database poller is connected to NCIM database 'NCIMP_APP.oradb.albertsons.com' (schema 'ncim')


This error is because some server mount points have restrictions on running processes as setuid. look at /etc/fstab and if the mount has nosuid, remove this to fix the issue.

Note: restart of the server is required for the new configuration to take effect.

After restart, the log file shows these lines

2018-09-11T17:02:18: Information: I-MOM-001-013: [3563349824t] Connected to broker: 127.0.0.1:1883 using clientId: ncp_poller_18546_BACKSTAGE_P
2018-09-11T17:02:18: Information: I-MOM-001-001: [3563349824t] ncp_poller[18546] Version 4.2 (Build 60) 64 bit on linux2x86 becoming Primary
2018-09-11T17:02:18: Information: I-DB-001-018: [3250796288t] Polling thread: Database poller is connected to NCIM database 'NCIMP_APP.oradb.albertsons.com' (schema 'ncim')
2018-09-11T17:02:18: Information: I-POL-001-003: [3248695040t] Opening plugin SnmpPoller: library name is /appl/esm/tivoli/netcool/precision/precision/platform/linux2x86/lib64/libNcpSnmpPoller.so
2018-09-11T17:02:18: Information: I-POL-001-003: [3248695040t] Opening plugin Monitor: library name is /appl/esm/tivoli/netcool/precision/precision/platform/linux2x86/lib64/libNcpMonitor.so
2018-09-11T17:02:20: Information: I-DB-001-018: [2327533312t] Polling thread: Database poller is connected to NCIM database 'NCIMP_APP.oradb.albertsons.com' (schema 'ncim')
2018-09-11T17:02:21: Information: I-DB-001-020: [3248695040t] Created handle 1 of (unlimited handles) in pool to DB 'NCIM'
2018-09-11T17:02:21: Information: I-DB-001-020: [3248695040t] Created handle 1 of (unlimited handles) in pool to DB 'POLLDATA'
2018-09-11T17:02:21: Information: I-FAI-001-006: [3248695040t] Operating as the primary ncp_poller in a failover pair


Some info on the mount point options.

I see those two options constantly suggested on the web when someone describes how to mount a tmpfs or ramfs. Often also with noexec but I'm specifically interested in nodev and nosuid. I basically hate just blindly repeating what somebody suggested, without real understanding. And since I only see copy/paste instructions on the net regarding this, I ask here.
This is from documentation:
nodev - Don't interpret block special devices on the filesystem.
nosuid - Block the operation of suid, and sgid bits.
But I would like a practical explanation what could happen if I leave those two out. Let's say that I have configured tmpfs or ramfs(without these two mentioned options set) that is accessible(read+write) by a specific (non-root)user on the system. What can that user do to harm the system? Excluding the case of consuming all available system memory in case of ramfs

Thursday, August 30, 2018

snmpwalk using script

$ head retail1.snmpWorking.Seed.200
10.192.124.196 fw0527a
10.221.200.196 fw9815a
10.221.120.196 fw9783a
10.220.24.196 fw9817a
10.195.220.196 fw9788a
10.218.156.196 fw9811a
10.218.88.196 fw9800a
10.218.72.196 fw9791a
10.226.40.196 fw4152a
10.218.132.196 fw9832a


cat retail1.snmpWorking.Seed.200 | awk '{print "printf " $1 "\"-->\"" ";/bin/snmpwalk -v3  -l authNoPriv -u monitor -a MD5 -A pc15uck5 " $1 " sysObjectID"}' > letsSnmpWalk_v3.sh

cat retail1.snmpWorking.Seed.200 | awk '{print "printf " $1 "\" " $2 "\"\" --> \"" ";/bin/snmpwalk -v3  -l authNoPriv -u monitor -a MD5 -A pc15uck5 " $1 " sysObjectID"}' > letsSnmpWalk_v3-retail1.sh



cat retail1.snmpWorking.Seed.200 | awk '{print "printf " $1 "\" " $2 "\"\" --> \"" ";/usr/bin/snmpwalk  -v3 -l authPriv -u meraki -a SHA -A pc15uck5 -x DES -X pc15uck5 " $1 " sysObjectID"}' 

/usr/bin/snmpwalk -v3 -l authPriv -u meraki -a SHA -A pc15uck5 -x DES -X pc15uck5 10.244.52.196 sysObjectId

sh /tmp/notworking.snmp.sh > out 2>&1 > /tmp/snmp.result

sh /tmp/notworking.snmp.sh > snmpResult.R3 2>&1



cat retail3.snmpWorking.Seed.200 | awk '{print "printf " $1 "\"-->\"" ";/bin/snmpwalk -v3  -l authNoPriv -u monitor -a MD5 -A pc15uck5 " $1 sysObjectID}' > /tmp/notworking.snmp.sh

SNMP install

# yum install net-snmp-utils
Loaded plugins: fastestmirror, priorities
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
deployed                                                                                                                                    | 2.9 kB  00:00:00
internal                                                                                                                                    | 2.9 kB  00:00:00
pc_repo                                                                                                                                     | 2.5 kB  00:00:00
internal/primary_db                                                                                                                         |  30 kB  00:00:00
Determining fastest mirrors
 * deployed: d1yum.safeway.com
 * internal: d1yum.safeway.com
Resolving Dependencies
--> Running transaction check
---> Package net-snmp-utils.x86_64 1:5.7.2-24.el7 will be installed
--> Processing Dependency: net-snmp-libs = 1:5.7.2-24.el7 for package: 1:net-snmp-utils-5.7.2-24.el7.x86_64
--> Processing Dependency: libnetsnmp.so.31()(64bit) for package: 1:net-snmp-utils-5.7.2-24.el7.x86_64
--> Running transaction check
---> Package net-snmp-libs.x86_64 1:5.7.2-24.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================
 Package                                   Arch                              Version                                     Repository                           Size
===================================================================================================================================================================
Installing:
 net-snmp-utils                            x86_64                            1:5.7.2-24.el7                              deployed                            197 k
Installing for dependencies:
 net-snmp-libs                             x86_64                            1:5.7.2-24.el7                              deployed                            747 k

Transaction Summary
===================================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 943 k
Installed size: 3.3 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): net-snmp-utils-5.7.2-24.el7.x86_64.rpm                                                                                               | 197 kB  00:00:00
(2/2): net-snmp-libs-5.7.2-24.el7.x86_64.rpm                                                                                                | 747 kB  00:00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                               12 MB/s | 943 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:net-snmp-libs-5.7.2-24.el7.x86_64                                                                                                             1/2
  Installing : 1:net-snmp-utils-5.7.2-24.el7.x86_64                                                                                                            2/2
  Verifying  : 1:net-snmp-utils-5.7.2-24.el7.x86_64                                                                                                            1/2
  Verifying  : 1:net-snmp-libs-5.7.2-24.el7.x86_64                                                                                                             2/2

Installed:
  net-snmp-utils.x86_64 1:5.7.2-24.el7

Dependency Installed:
  net-snmp-libs.x86_64 1:5.7.2-24.el7

Complete!
[root@pgv012245 msing90]# snmpwalk --help
USAGE: snmpwalk [OPTIONS] AGENT [OID]

  Version:  5.7.2
  Web:      http://www.net-snmp.org/
  Email:    net-snmp-coders@lists.sourceforge.net

Friday, August 24, 2018

Shell Script which uses sendmail

#!/bin/sh
#
# Generic script for forwarding Mail from Netcool/OMNIbus
#
# Parameters to be passed from Netcool/OMNIbus are;
# $1 - @Node
# $2 - @Severity
# $3 - "Message" - mail message header text
# $4 - "user" - user to receive mail
# $5 - @Summary
# $6 - @NodeAlias
#
cat <<EOF > /tmp/tmp.$$
To: $4
Subject: $3

This message refers to node $1 ($6) which has the following problem;

$5

The Severity is $2

Severity Table:
5 - Critical (Tickets)
4 - Major
3 - Minor
2 - Warning
1 - Indeterminate
0 - Clear (Resolution)

Sent by the Netcool/OMNIbus Automation system
EOF

# Find the send mail program: it is in different places on different platforms
for senddir in /usr/sbin /sbin /usr/lib /bin /usr/bin
do
        if [ -x "$senddir/sendmail" ]
        then
                break
        fi
done

# Run send mail
"$senddir/sendmail" $4 < /tmp/tmp.$$

rm /tmp/tmp.$$

Thursday, August 23, 2018

ITNM Startup Script - multiple domains

#!/bin/sh
###############################################################################
#
# chkconfig: 35 92 98
# description: Automatic startup/shutdown script for
# Netcool/Precision for IP Networks
#
### BEGIN INIT INFO
# Provides: ncp
# Required-Start: $network $sshd
# Required-Stop: $network $sshd
# X-UnitedLinux-Should-Start: portmap autofs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start the ncp daemon
### END INIT INFO

# File ID:     itnm/src/process/templates/ncp_auto.sh, itnm, itnm1.1
# Version:     1.2
# Last Update: 4/20/07 14:00:21
#
# IBM Confidential
# Licensed Materials - Property of IBM
# (c) Copyright IBM Corp. 2007 All Rights Reserved.
#
###############################################################################
#
# To install this in the /etc directory, run ncp_create_control_scripts.sh
# from the installation directory as root.
#
# Usage: ncp start | stop
# Exit status: 0=success, 1=warning, 2=failure
#
###############################################################################
##  All comments here

ITNMUSER=netcool
#DOMAINLIST="NCPRD_P"
DOMAINLIST="RETAIL2_P RETAIL1_B"

# These variables are set by 'sed' in the creation script.
set_edited_vars () {
    NCHOME=/opt/ibm/tivoli/netcool
    ITNM_BIN_DIR=/opt/ibm/tivoli/netcool/precision/bin
    ITNM_CONTROL_FUNCS=/opt/ibm/tivoli/netcool/precision/bin/itnm_control_functions.sh
    ITNM_AUTO_LOG_FILE=/opt/ibm/tivoli/netcool/log/precision/boot.log
    export ITNM_AUTO_LOG_FILE
}

#########################################################################
#
#  MAIN
#
#########################################################################

set_edited_vars
. $ITNM_CONTROL_FUNCS
check_exec_exists ${ITNM_BIN_DIR}/ncp_control.sh

# Tell subordinate script that this is called from the /etc/init directory
AUTO_INIT=YES
export AUTO_INIT

if `grep "^admin=" $NCHOME/etc/itnm.cfg 1>/dev/null 2>&1`; then
   user=`grep "^admin=" $NCHOME/etc/itnm.cfg 2>/dev/null | cut -f2 -d=`
else
   user=`grep "^installer=" $NCHOME/etc/itnm.cfg 2>/dev/null | cut -f2 -d=`
fi

case "$1" in
start|stop)
        for DOMAIN in $DOMAINLIST
        do
                #echo "Starting Domain Name ....  " $DOMAIN
                su - $user -c "${ITNM_BIN_DIR}/ncp_control.sh -domain $DOMAIN $1"
        done
;;
restart|reload)
        $0 stop
        $0 start
        ;;
*)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
    ;;
esac

exit $?

Wednesday, August 22, 2018

SNMPWALK v3


snmpwalk -v3  -l authNoPriv -u monitor -a MD5 -A pc15uck5 10.251.72.1 sysObjectID
snmpwalk -v3  -l authNoPriv -u monitor -a MD5 -A pc15uck5 172.27.132.28

R3 new - doesn't work
/usr/bin/snmpwalk -v3 -l authNoPriv -u monitor -a MD5 -A pc15uck5  10.244.52.196
snmpwalk -v3 -l authPriv -u meraki -a SHA -A pc15uck5 -x DES -X pc15uck5 10.244.52.196


[netcool@pgv01222f ~]$ /usr/bin/snmpwalk -v3 -l authPriv -u meraki -a SHA -A pc15uck5 -x DES -X pc15uck5 10.244.52.196
snmpwalk: Timeout
[netcool@pgv01222f ~]$


R3 old - works fine
/usr/bin/snmpwalk -v3 -l authNoPriv -u monitor -a MD5 -A pc15uck5  10.244.52.196

Thursday, August 2, 2018

sending snmp traps

yum install net-snmp
yum install net-snmp-utils

# snmptrap -c public -v 2c 172.26.41.189 "" 1.3.6.1.2.1.43.18.2.0.1

# snmptrap -v3 -e 0x111100000000000000000000 -u emsuser -a SHA -A  titpw4ems -x DES -X tiabpw4e 172.26.41.189:162 "" coldStart.0




- I have seen mttrapd probe didn't process these alarms because the firewalld was running and blocking the traffic