2.2.2 Resource collection function
Resources can be collected periodically according to predefined conditions. Data collected in this manner is stored in the database and can be browsed in the form of a table or graph. You can also set it so that if a preselected value is exceeded, the event is issued or a command is automatically executed. The following figure shows how SSO collects the resources.
|
SSO saves the data collected from the monitoring server to a database. The collected data can be referenced and deleted on the monitoring manager. If threshold monitoring is used, an event can be issued to the monitoring manager when a threshold is exceeded.
Because resources are collected from the MIB object of the SNMP agent on the monitoring server, the get-community-names of SSO and the SNMP agent must match.
The SNMP-agent protocol versions that are supported for resource collection are SNMP Version 1 (SNMPv1), SNMP Version 2 (SNMPv2c) and SNMP Version3 (SNMPv3).
The collectable resources depend on the SNMP agent that can be acquired by the MIB object. For details, see F.2 Relationship between resources to be collected and agent types. The following explains the detail of resource collection function.
- Organization of this subsection
(1) Setting collection conditions
Set the following as the conditions for collecting resources:
-
Server from which resources are to be collected
-
Resources to be collected
-
Instance
-
Collection mode (save data, threshold)
Collection modes, such as thresholds, can be set individually for each subresource. Registering instances makes it possible to set a collection mode for each instance. You can also set an interval and time for collecting resources.
To set the collection conditions, use the Resource Configuration window or collection condition configuration command (ssocolset). The following figure shows how collection conditions are set up.
|
(2) Collecting resources
Resources are to be collected in accordance with the collecting conditions registered in the collecting condition configuration file. The MIB objects of the resources targeted for collection are acquired from the SNMP agent running on the servers targeted for collection. The MIB objects are then stored in the database.
In resource collection, the following functions can be used.
-
Collection status management
-
Monitoring threshold
-
Automatic action
The timing at which the resource collection value is determined differs according to the resource. This is because there are resources that are calculated based on increments per collection interval for MIB objects, and resources that are calculated based on the current value of the MIB object. For details, see F.3 MIB objects that are acquired when resources are collected.
Management of the collection status is described below. For details on threshold monitoring and automatic actions, see 2.2.3 Threshold monitoring.
(a) Collection status management
Status is managed from the start to the end of resource collection. You can browse the collection status using the Resource Configuration window. Figure 2-11 shows the connection statuses managed by SSO and the collection status change triggers when the collection status Impossibility is disabled during a new installation. Figure 2-12 shows the connection statuses managed by SSO and the collection status change triggers when the collection status Impossibility is not disabled. For how to disable the collection status Impossibility, see ssocollectd and ssocolmng in 5. Commands.
|
-
The following events occurred simultaneously when collection started:
-
The start time specified at the start of collection (or, if not specified, the current time) was reached.
-
No collection time period was specified, or the current time fell within the specified collection time period.
-
-
Either of the following events occurred at the start of collection:
-
The start time specified at the start of collection (or, if not specified, the current time) was not reached.
-
The current time was outside the specified collection time period.
-
-
The current time was outside the specified collection time period.
-
Any of the following events occurred:
-
An SNMP error response was received.
-
SNMP request issuance or SNMP response reception failed.
-
The resources to be collected were not supported.
-
Writing of the collected data to the database failed.
-
-
Any of the following events occurred:
-
SSO stopped or paused.#2
-
Collection was stopped either through the Resource Configuration window or by the ssocolstop command.
-
The end time specified at collection response reception or collection start was exceeded.
-
-
At reception of a collection response, a normal response was received.
-
Same as 5.
-
Any of the following events occurred:
-
The start time specified at collection start was reached.
-
The current time was within the specified collection time period.
-
Collection restarted due to SSO startup.#3
-
-
Any of the following events occurred:
-
SSO stopped or paused.#2
-
Collection was stopped either through the Resource Configuration window or by the ssocolstop command.
-
The end time specified at collection start was reached.
-
-
Same as 1.
-
Same as 2.
Alternatively, collection to be restarted at SSO startup#3 did not restart because SSO start processing was in progress.
-
Same as 3.
- #1
-
When the resource status is Postponing, the collection interval is changed to 30 minutes by default. When normal collection resumes, the collection interval reverts to the preselected setting. If the preselected collection interval is 30 minutes or greater, the above collection interval change does not take place. The collection interval for the Postponing status can be defined in the ssocollectd action definition file. For details about the ssocollectd action definition file, see 6.3.9 ssocollectd action definition file (ssocollectd.def).
- #2
-
If collection stops because SSO stopped or the ssocolmng daemon process paused, the Completed collection status change event is not issued. Also, if collection ends because the ssocolmng daemon process paused, no resource status change event is issued.
- #3
-
Collection that stopped because SSO stopped or the ssocolmng daemon process paused can be restarted when SSO starts. In this case, the Collecting and Standing by collection status change events are not issued.
|
-
The following events occurred simultaneously when collection started:
-
The start time specified at the start of collection (or, if not specified, the current time) was reached.
-
No collection time period was specified, or the current time fell within the specified collection time period.
-
-
Either of the following events occurred at the start of collection:
-
The start time specified at the start of collection (or, if not specified, the current time) was not reached.
-
The current time was outside the specified collection time period.
-
-
The current time was outside the specified collection time period.
-
A noSuchName, genErr, or timeOut SNMP error has been received.
-
Any of the following events occurred:
-
An SNMP error other than noSuchName, genErr, or timeOut has been received.
-
Issuance of an SNMP request or reception of an SNMP response failed.
-
The resources to be collected were not supported.
-
Writing of the collected data to the database failed.
-
-
Any of the following events occurred:
-
SSO stopped or paused. #2
-
Collection was stopped either through the Resource Configuration window or by the ssocolstop command.
-
The end time specified at collection response reception or collection start was exceeded.
-
-
At reception of a collection response, a normal response was received.
-
Same as 6.
-
Same as 1.
-
Same as 2.
-
Any of the following events occurred:
-
The start time specified at collection start was reached.
-
The current time was within the specified collection time period.
-
Collection restarted due to SSO startup.#3
-
-
Any of the following events occurred:
-
SSO stopped or paused.#2
-
Collection was stopped either through the Resource Configuration window or by the ssocolstop command.
-
The end time specified at collection start was reached.
-
-
Same as 1.
-
Same as 2.
Alternatively, collection to be restarted at SSO startup#3 did not restart because SSO start processing was in progress.
-
Same as 3.
- #1
-
When the resource status is Postponing, the collection interval is changed to 30 minutes by default. When normal collection resumes, the collection interval reverts to the preselected setting. If the preselected collection interval is 30 minutes or greater, the above collection interval change does not take place. The collection interval for the Postponing status can be defined in the ssocollectd action definition file. For details about the ssocollectd action definition file, see 6.3.9 ssocollectd action definition file (ssocollectd.def).
- #2
-
If collection stops because SSO stopped or the ssocolmng daemon process paused, the Completed collection status change event is issued. Also, if collection ends because the ssocolmng daemon process paused, no resource status change event is issued.
- #3
-
Collection that stopped because SSO stopped or the ssocolmng daemon process paused can be restarted when SSO starts. In this case, the Collecting and Standing by collection status change events are not issued.
When the collection status changes, SSO can issue a collection status change event. For details on events, see G. Events.
(3) Saving collected data
The collected data is saved in a database on a per-resource basis. This database is called the collection database. The collection database is classified into two types: master database and copy database. The master database stores collected data. Copying the master database of the local host or remote host generates the copy database. The following explains the collection database.
(a) Resource directory
The collection database is created for each server in the resource directory for collected resources. The resource directory is the directory that SSO creates for each resource. For the names of resource directories, see E. Resource IDs.
(b) Collection database name
Collection database consists of data files (.log) for collected data storage, information files (.inf) for database information storage, and instance files (.ins) for instance information storage. JP1/Cm2/SSO determines the collection database name according to the naming rules. The collection database naming rules are stated below:
- database-identification
-
Indicates the collection database type.
0: Master database (The IP address of the monitoring server is IPv4.)
1: Copy database (The IP address of the monitoring server is IPv4.)
2: Master database (The IP address of the monitoring server is IPv6.)
3: Copy database (The IP address of the monitoring server is IPv6.)
- monitoring-manager-name
-
Indicates the IP address of the monitoring manager that has collected the resources and created the master database.
- monitoring-server-name
-
Indicates the IP address of the monitoring server that is targeted for resource collection.
- serial-number
-
If the monitoring manager name and monitoring server name are duplicated in a copy database, a five-digit serial number (from 00001 to 99998) is automatically appended. For a copy database that is created when the size of the master database reaches the maximum, 99999 (fixed value) is appended as the serial number. For details on the maximum size of a master database, see 6.3.8 ssocolmng action definition file (ssocolmng.def).
If, for instance, moitoring manager (IP address: 123.45.67.10) collects the resources of moinitoring server (IP address: 123.45.67.20), the files having the following names are created:
-
Data file: sso_0123045067010123045067020.log
-
Information file: sso_0123045067010123045067020.inf
-
Instance file: sso_0123045067010123045067020.ins
When the above master database is copied, a copy database that has the following file names is created:
-
Data file: sso_112304506701012304506702000001.log
-
Information file: sso_112304506701012304506702000001.inf
-
Instance file: sso_112304506701012304506702000001.ins
If, for instance, moitoring manager (IP address: 123.45.67.10) collects the resources of moinitoring server (IP address: 1234:567:89:a::20), the files having the following names are created:
-
Data file: sso_2123045067010123405670089000a0000000000000020.log
-
Information file: sso_2123045067010123405670089000a0000000000000020.inf
-
Instance file: sso_2123045067010123405670089000a0000000000000020.ins
When the above master database is copied, a copy database that has the following file names is created:
-
Data file: sso_3123045067010123405670089000a000000000000002000001.log
-
Information file: sso_3123045067010123405670089000a000000000000002000001.inf
-
Instance file: sso_3123045067010123405670089000a000000000000002000001.ins
However, if a copy database with serial number 00001 already exists, the copy database is created with serial number 00002.
For details on how to copy a database, see ssoextractlog in 5. Commands.
(c) Collection database size
The size of one entry in the collection database can be calculated by the following formula:
(subresource count x 31 + 3) x instance count + total length of character strings of all instance names + 12 (bytes)
The data file size of the collection database can be calculated by the following formula:
One-entry size x collection count
The maximum sizes of the collection databases that SSO can handle are as follows.
Unit |
Maximum size |
---|---|
Per data file |
Less than 2 gigabytes |
Per resource directory |
Less than 4 terabytes |
Total database capacity |
Less than 4 terabytes |
The collection database monotonically increases in size until the maximum value (calculated by the expression shown above) is reached. For details on this monotonic increase, see (e) Collection database maintenance. For details on the maximum size of a collection database, see 6.3.8 ssocolmng action definition file (ssocolmng.def).
(d) Collection database monitoring
The collection database size monitoring command (ssodbcheck) allows you to monitor the collection database size. In situations where the collection database size is monitored, it can be output into a text file, or an event can be issued when the preselected threshold is exceeded. For details on events, see G. Events.
(e) Collection database maintenance
The resource collection database grows until it reaches the maximum size. (For the formula for estimating the file size of a collection database, see (c) Collection database size. For details on the maximum size of a collection database, see 6.3.8 ssocolmng action definition file (ssocolmng.def).) Partial deletion by using the ssoextractlog or ssodbdel commands, or partial deletion of data through a dialog box takes time in proportion to the size of the collection database. Therefore, if the collection data is saved periodically, make sure that you periodically delete the collected data (either by deleting all the data or partially deleting the data for a specific period) in order to secure a sufficient amount of free space on the disk.
For how to delete collection data, see 4.5 Resource Data Reference window and ssodbdel in 5. Commands.
The following is an example of periodic deletion of collection data.
- Example:
-
This example shows how to delete the collection data collected up until the last weekend by executing the following command every weekend:
ssodbdel -all -stop BDATE 7
Note, however, that if the free space in the file system of the collection database is already insufficient (less than the size of the largest data file in the collection database), you must delete all the data in the collection database. Partial deletion of the data for a specific period is not possible. To check the data file size of the collection database, execute the ssoextractlog -list command, and then check Size in the information output to the standard output. Alternatively, check Size (KBytes) in the collection data list in the Resource Data Reference window.
For details on the ssoextractlog command, see ssoextractlog in 5. Commands. For details on the Resource Data Reference window, see 4.5 Resource Data Reference window.
(4) Browsing collected data
The data stored in the collection database can be browsed. To browse collected data, use the Resource Data Reference window or the command for browsing collected data (ssoextractlog).
The collected data can be filtered allowing you to choose whether to view the data collected at a specific time or the data within a specific range. It can also be stored in a file in binary format or CSV format. When the collected data is stored in binary format, the resulting database serves as a copy database.
(5) Deleting collected data
Data stored in the collection database can be deleted. You can delete the entire database by specifying the resource, monitoring manager, or monitoring server, or delete specific data within the database by specifying the data collection time. This deletion process can be executed from the Resource Data Reference window or collection database deletion command (ssodbdel).