3.7.5 Checking registration status of YAML files

You can check the registration status of YAML files in Ops I on the GitOps log tab of the system application. When you access the GitOps log tab, the API "gitops-logs" is executed, and the GitOps log (results of executing the API "gitops-logs") is displayed.
For details about the GitOps log tab screen, see “GitOps log tab”.

[How to read the GitOps log]

From the GitOps log, you can check whether operations on YAML files succeeded or failed, as well as file errors (syntax or dependencies) that caused failures.

To check the execution results, refer to “result” in the GitOps log. The following results are output:

  • applied: Successful
  • recovered: Restored
  • failed: Failed

If the result is failed, registration of the YAML file has failed. If registration has failed, the following will be displayed in “detail”, and the location can be identified and the cause of the failure can be checked.

  • column: Column in which the error occurred
  • data: Line data in which the error occurred
  • line: Line in which the error occurred
  • message: Detailed error message

“Recovered” indicates the state in which a YAML file that failed due to an error in a dependency in a past commit has recovered its registration status as a result of the dependency error being resolved in a later commit. (Example of a dependency error being resolved: when a YAML file with a dependency is successfully registered or deleted, etc.)

NotesNotes

  • The following "failed" results may appear in the GitOps log, but this is not a problem
    kind: system
    name: conf
    result: failed
    reason: format_error
    detail.message: "Validator for kind 'system', apiVersion '1.0' does not exists"
  • The validation results for YAML files that can be checked by executing the API "gitops-logs" are provided for all repositories, regardless of the group to which the user belongs.


[If there is no GitOps log]

If there is no GitOps log, it is not recognized as a document by Ops I, even if it has been committed on GitLab, and it is not reflected in Ops I.
Possible causes are as follows.

  • The registered file was not a YAML file
  • YAML file management is disabled for the commit destination repository. (For information about YAML file management, see “Repository management”.)
  • The file extension or file name (manifest.yaml) are different

[When checking via the API]

You can also check the contents of the GitOps log via the API.
When checking via the API, you must perform API authentication. For details, see “API reference overview > Prerequisite knowledge” in “JP1 Cloud Service/Operations Integration API Reference”.

An example of the API call is shown below:

<Execution example> /api/v1/gitops-logs

# curl -XGET "Ops I URL/api/v1/gitops-logs" ¥
-H "X-OpsI-Token: Ops I token"