| // Copyright 2021 Google LLC |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // Protobuf definitions for reporting instance status. |
| syntax = "proto2"; |
| |
| import "policy_manager/policymanagerproto/update_status.proto"; |
| |
| package policymanagerproto; |
| |
| // ReleaseChannel specifies the Chrome OS release channel that the image is on. |
| enum ReleaseChannel { |
| // Unknown release channel. |
| RELEASE_CHANNEL_UNSPECIFIED = 0; |
| |
| // Stable channel. |
| STABLE = 1; |
| |
| // Beta channel. |
| BETA = 2; |
| |
| // Dev channel. |
| DEV = 3; |
| |
| reserved 4; |
| } |
| |
| // OSVersion contains all the fields identifying a particular version of the |
| // Chrome OS. |
| message OSVersion { |
| // Release version string. For example: "16511.0.0" |
| // Chrome OS uses the following version format: |
| // <TIP_BUILD>.<BRANCH_BUILD>.<BRANCH_BRANCH_BUILD> |
| optional string version_string = 1; |
| |
| // Milestone number for Chrome. For example: 89 |
| optional uint32 milestone = 2; |
| |
| // Release channel of the OS. |
| optional ReleaseChannel channel = 3; |
| |
| // Next number: 4 |
| } |
| |
| // DEPRECATED |
| // StackdriverStatus contains all the necessary fields for the current status |
| // of stackdriver logging/monitoring. |
| message StackdriverStatus { |
| // logging is set to true if the stackdriver logging systemd service |
| // is active and running. |
| optional bool logging = 1; |
| |
| // monitoring is set to true if the stackdriver monitoring systemd service |
| // is active and running. |
| optional bool monitoring = 2; |
| |
| // Next number: 3 |
| } |
| |
| // MonitoringStatus contains all the necessary fields for the current status |
| // of Health monitor status. |
| message HealthMonitorStatus { |
| // logging is set to true if the logging systemd service |
| // is active and running. |
| optional bool logging = 1; |
| |
| // monitoring is set to true if the monitoring systemd service |
| // is active and running. |
| optional bool monitoring = 2; |
| } |
| |
| // InstanceStatus contains all the fields related to the current status of the |
| // instance. |
| message InstanceStatus { |
| // GCE instance ID. |
| optional uint64 instance_id = 1; |
| |
| // Current version of the image. |
| optional OSVersion os_version = 2; |
| |
| // Possible status of the update_engine. |
| enum UpdateStatus { |
| // Unknown update status. |
| UPDATE_STATUS_UNKNOWN = 0; |
| |
| // No update related activity. |
| UPDATE_STATUS_IDLE = 1; |
| |
| // Currently querying Omaha for update. |
| UPDATE_STATUS_CHECKING_FOR_UPDATE = 2; |
| |
| // An update is available but not yet downloaded. |
| UPDATE_STATUS_UPDATE_AVAILABLE = 3; |
| |
| // In process of downloading the update. |
| UPDATE_STATUS_DOWNLOADING = 4; |
| |
| // Verifying the downloaded update package. |
| UPDATE_STATUS_VERIFYING = 5; |
| |
| // Finalizing the update installation. |
| UPDATE_STATUS_FINALIZING = 6; |
| |
| // Update installed, ready for reboot. |
| UPDATE_STATUS_UPDATED_NEED_REBOOT = 7; |
| |
| // In process of reporting an error. |
| UPDATE_STATUS_REPORTING_ERROR_EVENT = 8; |
| |
| // Attempting rollback using the inactive root partition. |
| UPDATE_STATUS_ATTEMPTING_ROLLBACK = 9; |
| |
| // Update has been disabled. |
| UPDATE_STATUS_DISABLED = 10; |
| } |
| |
| // The current update status as reported by the update_engine. |
| optional Operation update_status = 3 [default = ERROR]; |
| |
| // New version delivered by the update. |
| // This fields is only useful if the update engine status is one of the |
| // following: |
| // UPDATE_STATUS_UPDATE_AVAILABLE |
| // UPDATE_STATUS_DOWNLOADING |
| // UPDATE_STATUS_VERIFYING |
| // UPDATE_STATUS_FINALIZING |
| optional OSVersion new_os_version = 4; |
| |
| // Unix timestamp of last reboot. |
| optional int64 reboot_timestamp = 5; |
| |
| // Unix timestamp fo last update check. |
| optional int64 update_check_timestamp = 6; |
| |
| // If an error occurred while collecting the instance status, this field will |
| // be set with the error message and all other fields except the instance_id |
| // are undefined. |
| optional string error = 7; |
| |
| optional StackdriverStatus stackdriver_status = 8; |
| |
| optional HealthMonitorStatus health_monitor_status = 9; |
| |
| // Next number: 10 |
| } |