środa, 9 listopada 2016

IBM Tivoli Monitoring - iSeries Management Central monitor

Problem:
How to get events from System iSeries Navigator (Management Central).

In Management Central I've set a few metrics to monitor my iSeries server, e.g. "Disk Arm Utilization", "CPU Utilization" or "User Pool Faults".

On these metrics I've set thresholds when metrics get a bad value.


OK, but I would like to see these problems on IBM ITM.
How to do it?

 
Solution:
1. First, I have to set thresholds, as I've wrote above.

In Management Central, you can see this:




2. Next, in ITM I builded new situatuation: 











 


Done :)


---
If you like this or not - please write any comments below, thanks:)
or if you have any questions please send me email. I'll try to explain more.

czwartek, 25 sierpnia 2016

iSeries - Check/Change maximum number of spooled records

Problem:
Sometimes you can get problem with jobs which have MSGW status.
In the job you can see message:

Message . . . . : Reached maximum number of spooled records for file QPRINT
in library QGPL. (C R NOMAX 1-999999)



Solution:
1. Check what is the number of spooled records.
On console type: CHGPRTF FILE(QPRINT) and next press F4 key, then F10 key.
Next Page Down key a few times where you can find position "Max spooled output records". You can change this value to bigger.


2. To change, you can use this command also:
On console type:
CHGPRTF FILE(QPRINT) MAXRCDS(1000000)
but before check that QPRINT object isn't loked:
WRKOBJLCK OBJ(QPRINT) OBJTYPE(*FILE)


Be careful - don't use *NOMAX value.


---
If you like this or not - please write any comments below, thanks:)
or if you have any questions please send me email. I'll try to explain more.









wtorek, 7 czerwca 2016

IBM Tivoli Monitoring - reduce space in Data Warehouse (TDWH) database

Problem:
How to monitor size of Tivoli Data Warehouse database (TDWH) to reduce space.

I think that a lot of you have a problem with too rapidly growing size of data collected in Data Warehouse database.
Especially when you test new data collections, and some of them after a while you remove, back out of them.

After my tests and under normally work I have to reorganize top of tables (20 tables) to reduce space.

Of course, you can calculate the amount of data being collected and warehoused by the Tivoli agents in yours TDWH. You can use for it by this spreadsheet:
https://www-304.ibm.com/software/brandcatalog/ismlibrary/details?catalog.label=1TW10TM1Y,
but do you have time for it or do you want to use it? :)
 
Solution:
1. I use ITCAM Agent for DB2, where I used "Customized SQLs" group.
Default, I used properties file: kudcussql.properties where I defined new entries: SELECTSQL

[SELECTSQL]
SQL_ID=sql2
SQL_TEXT= select sum(((decimal(float(t.fpages)/ ( 1024 / (b.pagesize/1024)),9,2)) - (decimal(float(t.npages)/ ( 1024 / (b.pagesize/1024)),9,2)))) as SUMA from syscat.tables t, syscat.tablespaces b where t.tbspace=b.tbspace and tabschema='ITMUSER' and  ((float(t.npages)/ ( 1024 / (b.pagesize/1024)) * 100)) / (float(t.fpages)/ ( 1024 / (b.pagesize/1024))) between 1 and 95;



SQL_ID -  this is unique name SQL definition
SQL_TEXT -  this is my SQL statement

In ITM, you can see this:



2. Next, in ITM I builded new situatuation: 
 
This situation will fired when attribute "First Number Value" will be bigger than 5000 (5GB). After that I reorganize my 20 top of tables to reduce space.


---
If you like this or not - please write any comments below, thanks:)
or if you have any questions please send me email. I'll try to explain more.



wtorek, 24 listopada 2015

IBM Tivoli Monitoring - Simple way to check yum update on ITM

Problem:
A few months ago my colleague asked me. It possible to check availability packages on repo on Linux's servers (Centos, Redhat)?
My answer was: Hmmm, I'll write you an agent on IBM Agent Builder which could check result of command: "yum check-update" and then I can build a situation on ITM.
But I didn't have enough time to build this agent, and now I have simple solution...


Solution:
I had to install fix pack ITM 6.3.0.5 and then... I spotted the custom scripts - great idea.

1. You have to create properties file (yumcheck.properties) like this on Linux server (monitored agent):
ATTRIBUTE_NAME=YUM_CHECK
SCRIPT_PATH_WITH_PARMS=/opt/IBM/ITM/localconfig/lz/scripts_definitions/yumcheck.sh
EXECUTION_FREQUENCY=86400
OUTPUT_TYPE=STRING
TOKEN_TYPES=I
TOKEN_SEPARATOR=|


Next, create shell script (yumcheck.sh) in: 
/opt/IBM/ITM/localconfig/lz/scripts_definitions/ like this:
#!/bin/ksh
# 20.11.2015
# Script check availability of packages to installation (yum-update).
#

var=$(yum check-update | wc -l)
printf "%s|%d\n" "Yum avail. package to install" ${var}


2. This script yumcheck.sh will be run once a day (EXECUTION_FREQUENCY set to 86400s = 24hours).
When script will run successful, it will return result of command: "yum check-update | wc -l"


3. In this picture you can see results:



4. At the end, I builded situation to check result of script.
My situation is fired when attribute "Custom attribute Integer #1" is greater than 10 available packages to install.

---
If you like this or not - please write any comments below, thanks:)
or if you have any questions please send me email. I'll try to explain more.

---
Links: 
http://www-01.ibm.com/support/docview.wss?uid=swg21960062

piątek, 3 lipca 2015

IBM Tivoli Monitoring - Enforcive/Enterprise Security for IBM i [BSafe] (how to connect together)

Problem:
How to receive alerts intrusions which were detected by Enforcive Enterprise Security.
I would like to check any undesirable attempt login to database.

Solution:
1. Firstly, I prepared a suitable alert in EES Manager.
I builded an alert with conditions:
Application: Database
Event Type: Reject 
And in "Alert action" I defined the action: "Send Message to Message Queue" where I use i5 agent queue.
This alert will be fired when EES reject login to database. Result we can see on i5 server.


2. I builded a situation in ITM which checks messages queue that I defined in EES: "KMSOMLOG" on "QAUTOMON" library (default library i5 agent). Of course you can use different queue.
This situation will be fired when it checks messages on i5.

---
If you like this or not - please write any comments below, thanks:)
or if you have any questions please send me email. I'll try to explain more.  

---
Links: 
http://www.enforcive.com/enforcive-enterprise-security

poniedziałek, 25 maja 2015

IBM Tivoli Monitoring - BRMS (how to check tapes are availables)

Problem:
How to check that tapes are availables in BRMS on i5 (iSeries) in ITM?

Solution:
I had to find out how to check available tapes on i5, by the command.
I have to use a command: CHKEXPBRM.

How to do it in ITM?
1. I build first situation "WOW_MS_RunCmd2_BCK_CHKEXPBRM" on Enterprise (TEMS) which run at exactly time a day and run an action
"CHKEXPBRM EXPMED(4) MEDCLS(CLS_ULTR6) LOC(TAPMLB01)" on agent (distribution - i5).

This situations expire after 24 minutes.


2. Next, I build second situation on i5 (distribution) which have a 4 conditions:
- Message Queue - it contains: "KMSOMLOG"
- Message Queue Library - it contains: "QAUTOMON"
- ID - it contains: "CNB7008"
- Data - it contains: "Action returned with status 4 for situation WOW_MS_RunCmd2_BCK_CHKEXPBRM"
This second situation check the result of command execution caused in first situation.

This situations expire after 25 minutes.


---
If you like this or not - please write any comments below, thanks:)
or if you have any questions please send me email. I'll try to explain more.

---
Links:
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_61/cl/chkexpbrm.htm