About the STA Resource Monitor Service
Once enabled, the Resmon service runs in the background and monitors usage levels of resources on the STA server.
Resmon does the following:
- Periodically scans the following resources on the STA server.
- Database tablespace
- Database data
- Database backup
- Log volume (by default,
/var/log/tbi
) - root volume (
/
) - Temp volume (by default,
/tmp
) - System memory
- Records current values for these resources in the Resource Report and optionally emails the report.
- Optionally sends a Resource Depletion Alert Report whenever it detects that a monitored resource has exceeded a user-defined high-water mark (HWM).
Sample Resmon Scenario
The following scenario describes the Resmon service process.
Database tablespace usage on the STA server is currently 85 percent. The Resmon service is enabled with the following parameter values:
- Send Reports =
08:41
- Sleep Interval =
1800
- Alert Nagging =
ON
- DB Tablespace high-water mark (HWM) =
80
- Email 'To:' =
charlie@mycompany.com
The Resmon service will perform the following:
- Every 1800 seconds (30 minutes), Resmon scans the monitored resources on the STA server and adds a record of the current values to the end of the Resource Report file.
- During the scan, Resmon detects that database tablespace has
exceeded the defined high-water mark and performs the following actions:
- Records an alert in the Resource Report file.
- Because alert nagging is enabled, immediately sends a Resource Depletion Alert Report to the designated email recipient (Email 'To:'). Resmon continues to send the report every 1800 seconds until the tablespace usage is brought below the defined high-water mark.
- Every day at 08:41 (Send Reports time), Resmon sends a copy of the Resource Report to the designated email recipient.
Resmon Resource Report
The Resmon resource report is a daily report that provides data for all monitored resources and alerts for any resources that have exceeded their defined high-water marks.
The Resmon service sends the Resource Report to all Resmon email recipients once a day, at approximately the "Send Reports" time. Reported values rely on mount points. If multiple monitored resources share a mount point, their reported values will be identical.
Example 4-1 Sample Resource Report With Alerts email
From: StaResMon@mystaserver.mycompany.com Subject: STA Resource Monitor Report [2015-12-21 23:13:33] To: charlie@mycompany.com STA RESOURCE MONITOR STANDARD REPORT System: mystaserver Scanned: 2015-12-21 23:13:33 Database Tablespace HWM : 80.00% Used : 1.38% MB Used : 1046 MB Free : 74730 MB Total : 75776 Location : /dbdata/mysql Database Volume HWM : 75.00% Used : 80.33% (!) MB Used : 80967 MB Free : 19827 MB Total : 100794 Directory : /dbdata Logging Volume HWM : 75.00% Used : 79.55% (!) MB Used : 20045 MB Free : 5154 MB Total : 25199 Directory : /var/log/tbi
Resource Report CSV File
The Resource Report file is a comma-delimited (CSV) file that provides a continuous record of every Resmon scan performed on the STA server since the file was created.
Each time Resmon completes a scan, it adds a record containing the scanned values to the end of the file. The Resource Report file continues to grow with each scan. Managing the file, including backing it up and managing the file size, is the customer's responsibility. It is not purged, rolled, nor backed up by the STA application nor the STA backup service.
The Resource Report data file, by default has the following location and file name.
/var/log/tbi/db/staresmon.csv
Import the file into spreadsheet or database management applications to create reports and graphs of the values.
Table 4-1 Resource Report Record Format
Col | Header | Description | Format |
---|---|---|---|
1 |
|
Date and time of the scan |
|
2 |
|
Maximum tablespace, in MB |
|
3 |
|
Total database tablespace used, in MB |
|
4 |
|
Database tablespace remaining, in MB |
|
5 |
|
Database tablespace used, as a percentage of the maximum |
|
6 |
|
Database tablespace high-water mark, as a percentage of the maximum; this is user-defined. |
|
7 |
|
Total allocated space on the volume containing the database, in MB |
|
8 |
|
Total database disk volume space used, in MB |
|
9 |
|
Database volume disk space remaining, in MB |
|
10 |
|
Database volume disk space used, as a percentage of the maximum |
|
11 |
|
Database volume high-water mark, as a percentage of the maximum; this is user-defined. |
|
12 |
|
Total allocated space on the volume containing the logs, in MB |
|
13 |
|
Total logging disk volume space used, in MB |
|
14 |
|
Logging volume disk space remaining, in MB |
|
15 |
|
Logging volume disk space used, as a percentage of the maximum |
|
16 |
|
Logging volume high-water mark, as a percentage of the maximum; this is user-defined |
|
17 |
|
Maximum installed physical RAM, in MB |
|
18 |
|
Total physical memory used, in MB |
|
19 |
|
Physical memory space remaining, in MB |
|
20 |
|
Physical memory space used, as a percentage of the maximum |
|
21 |
|
Physical memory high-water mark as a percentage of the maximum; this is user-defined. |
|
Resource Depletion Alert Report
If you enable alert nagging, Resmon sends a Resource Depletion Alert Report whenever it detects that any monitored resources have exceeded their defined high-water marks. If you disable alert nagging, alerts appear only in the daily Resource Report.
Example 4-2 Example Resource Depletion Report email
From: StaResMon@mystaserver.mycompany.com Subject: ALERT::STA Resource Depletion [2015-12-22 09:13:36] To: charlie@mycompany.com STA RESOURCE DEPLETION REPORT System: mystaserver Scanned: 2015-12-22 09:13:36 ************************************************************ * A L E R T S * ************************************************************ ================================================== ALERT - Low Database Volume Disk Space ================================================== Database disk volume has exceeded threshold value! HWM [75.00%] Used [80.33%] (!) MB Used [80967] MB Free [19827] MB Total [100794] Directory [/dbdata] Recommendations: 1) Purge old backup files. 2) Relocate database directory to a larger volume. ================================================== ALERT - Low Logging Volume Disk Space ================================================== Logging volume disk usage has exceeded threshold value! HWM [75.00%] Used [79.55%] (!) MB Used [20045] MB Free [5154] MB Total [25199] Location [/var/log/tbi] Recommendations: 1) Purge STA log files. 2) Purge MySQL binary logs. 3) Purge MySQL error logs. 4) Relocate logging directory to a larger volume.