5.11.4 Delete Trend Data
- Description
-
Deletes trend data stored in Trend data Management Database by Prometheus and Fluentd of the specified hostincluding user-defined Prometheus and your own Fluentd. Restarts trend data management service automatically after the trend data is deleted.
Hosts cannot be deleted if the logged-in JP1 user does not have read/write access privileges. Note that all trend data saved by integrated agent, user-defined Prometheus, and Fluentd of the host for which trend data is to be deleted is deleted if IM management node of the host of the user's own Fluentd has read/write access privileges.
After deletion, the deleted information is not reflected in JP1/IM - Manager (Intelligent Integrated Management Base) tree information. To import the information, generate and import the tree information from integrated operation viewer, or execute jddcreatetree command and jddupdatetree command (specify the configuration change mode (-c option)).
- Execution permissions
-
-
JP1_Console_Admin
-
- API version
-
v1
- Format
-
- Request line
POST im/api/v1/trendData/delete HTTP/1.1
- Request message body
{ "deletelist": [ { "managerhost": manager-hostname, "deleteinfolist": [ { "agenthost": integrated-agent, user-defined-Prometheus, user-defined-Fluentd-hostname }, ... }, ... ] }- Response message body
-
If the status code is 200 and normal termination occurs, no response is returned.
If the status code is 200 and the warning ends, the following response is returned.
{ "errdeletelist":[ { "managerhost": manager-hostname, "deleteinfolist": [ { "agenthost": integrated-agent, user-defined-Prometheus, user-defined-Fluentd-hostname },... ] },... ], "errrestartlist":[ { "managerhost": manager-hostname, "deleteinfolist": [ { "agenthost": integrated-agent, user-defined-Prometheus, user-defined-Fluentd-hostname },... ] },... ], "messageList":[ { "messageId": message-ID, "message": messaging },... ] }
- Parameters
-
Here are the parameters that you specify for message body of the request:
No.
Parameters
Data type
Optional
Description
1
deletelist
object[]
No
Specify the information to be deleted. You can specify up to 200# to be deleted. An empty array cannot be specified.
- #
-
You can specify up to 200 elements of all deleteinfo in a deletelist.
2
managerhost
string
No
Specifies# of manager hostnames managed by Trend data Management Database that stores trend data to be deleted, from 1 to 255. Characters other than control characters can be specified. It is case sensitive.
- #
-
Specify the host name of the host specified in No. 4 as the destination manager host.
3
deleteinfolist
object[]
No
Specifies the information to be deleted for each manager host. You can specify up to 200# to be deleted. An empty array cannot be specified.
- #
-
You can specify up to 200 elements of all deleteinfo in a deletelist.
4
agenthost
string
No
Specify the host name from 1 to 255 bytes for integrated agent, user-defined Prometheus, and user-defined Fluentd. Characters other than control characters can be specified.
Deletes Trend data Management Database trend data saved by Prometheus and Fluentd specified by this parameter, including user-defined Prometheus and user-defined Fluentd. It is case sensitive.
- Response
-
-
When the status code is 200
If the manager specified in the request succeeds in all API operations, regardless of the Integration Manager and lower manager, the response will have no message body.
When an error or warning occurs in the processing of lower manager specified in the request, or when a warning occurs in the processing of the Integration Manager, the information shown in the following table is returned to the message body of the response.
No.
Parameters
Data type
Optional
Description
1
errdeletelist
object[]
Yes
The array to be deleted that could not delete the trend data is set. If there is no failed deletion target, it is omitted.
2
managerhost
string
No
Sets the manager hostname# that failed to remove trend data.
- #
-
The host name of the host set in No. 4 is set as the host name of the destination manager.
3
deleteinfolist
string
No
Sets an array of information to be deleted for each manager host for which trend data could not be deleted. If there is no failed deletion target, it is omitted.
4
agenthost
string
No
Sets the hostname of integrated agent, user-defined Prometheus, or user-defined Fluentd for which trend data could not be deleted.
5
errrestartlist
object[]
Yes
Trend data is deleted successfully, and an array of items to be deleted that failed to restart trend data management service is set. If there is no failed deletion target, it is omitted.
6
managerhost
string
No
Configures a manager hostname# that successfully deletes trend data and fails to restart trend data management service.
- #
-
The host destination manager host name set in Item 8 is set.
7
deleteinfolist
string
No
Successful deletion of trend data sets an array of data to be deleted for each manager host that fails to restart trend data management service. If there is no failed deletion target, it is omitted.
8
agenthost
string
No
Successfully deleted trend data and trend data management service reboot fails to set the hostname of integrated agent, user-defined Prometheus, and user-defined Fluentd.
9
messageList
object[]
Yes
An array of message objects is set. If the message does not exist, it is omitted.
10
messageId
string
No
The messaging ID is set.
11
message
string
No
The message body is set. The language used is determined by Accept-Language property specification in HTTP request header.
-
When an error with a status code other than 200 occurs
The response-type exception object described in 5.2.6 Error response message is returned in the message body of the response.
-
- Status codes
-
The following table lists the status codes and messages returned in response to requests.
Status code
Message
Description
200
None
API operation was successful.
KAJY62011-W
-
The logged-in user does not have integrated agent, user-defined Prometheus, or user-defined Fluentd host browse and manipulate permissions specified in the request.
-
The manager host specified in the request is lower manager and has not been added to lower manager in the lower manager List window.
KAJY62012-W
Failed to remove trend data for Trend data Management Database on the manager host specified in the request.
KAJY62013-W
Failed to restart trend data management service for the manager host specified in the request.
KAJY62014-W
Unable to connect to integrated agent Administration DB of the manager host specified in the request.
KAJY62015-W
Delete trend data operation was performed consecutively on the same-host Trend data Management Database because Delete trend data or integrated agent informationdeletion was performed consecutively.
400
KAJY62010-E
API request is invalid.
Processing is interrupted when one of the incorrect requests is found.
403
KAJY01000-E
The privilege of the user used for authentication is insufficient.
500
KAJY00007-E
A system error occurred (out of disk, out of memory, etc.).
-
- Return values
-
None
- Notes
-
Refer to Notes on Deleting trend data in 2.7.2(3)(g) Deleting Trend Data Manually (Specify integrated agent, user-defined Prometheus, and user-defined Fluentd host names and Delete) in the JP1/Integrated Management 3 - Manager Overview and System Design Guide.
- Examples
-
- Request:
POST http://immhost01:20703/im/api/v1/trendData/delete Manager hostname: immhost01 { "deletelist": [ { "managerhost":"hostB" "deleteinfolist": [ { "agenthost":"hostA" } ] }, { "managerhost":"hostD" "deleteinfolist": [ { "agenthost":"hostC" } ] } ] }- Response (normal):
< HTTP/1.1 200 OK < Content-Type: application/json
- Response (normal):
< HTTP/1.1 200 OK < Content-Type: application/json { "errdeletelist":[ { "managerhost":"hostB", "deleteinfolist": [ { "agenthost":"hostA" } ] } ], "errrestartlist":[ { "managerhost":"hostD", "deleteinfolist": [ { "agenthost":"hostC" } ] } ], "messageList":[ { "messageId":"KAJY62011-W", "Message":"A host that cannot delete trend data was specified. (JP1/IM-Manager host name : hostB, deletion target host name : hostA)" }, { "messageId":"KAJY62013-W", "Message":"An attempt to restart the trend management service after deleting trend data failed. (JP1/IM-Manager host name : hostD, deletion target host name : hostC)" } ] }