Updated on 2024-01-12 GMT+08:00

Viewing Raw Data

Scenarios

This topic describes how to view the monitoring data saved in the OBS bucket by downloading metric data files.

Prerequisites

  • You have successfully configured data storage on Cloud Eye.
  • You have installed Java and configured environment variables.
  • You have downloaded the format conversion tool metric-transfer-merge.jar .

Procedure

  1. Log in to the management console.
  2. Click Service List in the upper left corner, and select Cloud Eye.
  3. In the navigation pane on the left, choose Cloud Service Monitoring. Locate the target resource and select the specified OBS bucket in the Permanent Data Storage column.

    Alternatively, in the navigation pane on the left, choose Server Monitoring. Locate the target ECS, and select the specified OBS bucket in the Permanent Data Storage column.

  4. Select the metric data file you want to view in the OBS bucket. Based on the storage path of the metric data file, select OBS bucket name > CloudEye > Region > Year > Month > Day > Service type directory > Resource type directory. Click Download in the Operation column to download the file to the default path. To download the metric data file to a customized path, click Download As.

    The metric data file is named in the following format:

    Metric data file prefix_CloudEye_Region_Time when the log was uploaded to the OBS: year-month-dayThour-minute-secondZ_Randomly generated character.json.gz

    Example: File Prefix_CloudEye_region_2016-05-30T16-20-56Z_21d36ced8c8af71e.json

    • The OBS bucket name and trace file prefix are user-defined, and other parameters are automatically generated.
    • Original metric data files are segment files of time granularity. The files include all metric data of a resource under the time segment. The metric data is stored in the JSON format.
    • To facilitate your operations, Cloud Eye provides the format conversion and content combination tool. Using this tool, you can combine the files of several time slices in a specific resource into a time-staged file in the chronological order in the .csv format. In addition, you can use the tool to generate an independent time splice file for every metric of the resource in the .csv format.
  5. Access the cmd tool in the Windows system. Go to the folder where metric-transfer-merge.jar is located, run the java -jar metric-transfer-merge.jar j2c inputDirectory outputDirectory mergFileName command.
    In the Linux system, run the java-jar metric-transfer-merge.jar inputDirectory outputDirectory mergFileName command in the shell command line.
    • j2c is the command to convert JSON into CSV.
    • inputDirectory is the directory to store the downloaded JSON files.
    • outputDirectory is the directory to store the generated files.
    • mergFileName is the name of the specified combined file for users. This parameter can be ignored because the tool will name the combined file as mergeResult.csv by default.
    After running the java command, you can view the converted files in the outputDirectory directory. Each file corresponds to the data of one metric at all time points. mergeResult.csv is a large file generated by combining the data of all metrics. Figure 1 shows the content of the converted file.
    Figure 1 Metric data