[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-08-02。"],[[["\u003cp\u003eThis document explains how to use BindPlane to ingest logs from on-premises infrastructure and applications into Cloud Logging.\u003c/p\u003e\n"],["\u003cp\u003eBindPlane, a third-party tool, allows for remote deployment and management of agents to collect logs without requiring custom development, and is included in the cost of Cloud Logging.\u003c/p\u003e\n"],["\u003cp\u003eAlternatively, logs can be sent directly to the Cloud Logging API, although this method requires code instrumentation or the development of a custom agent, demanding a higher level of effort.\u003c/p\u003e\n"],["\u003cp\u003eOnce logs are in Cloud Logging, they can be viewed, processed, exported, and used to create metrics and alerts in Monitoring, leveraging the \u003ccode\u003egeneric_node\u003c/code\u003e or \u003ccode\u003egeneric_task\u003c/code\u003e resource types for non-cloud resources.\u003c/p\u003e\n"],["\u003cp\u003eThe document outlines various use cases for using BindPlane to ingest log data from custom applications, operating systems, network devices, and Kubernetes environments into Cloud Logging.\u003c/p\u003e\n"]]],[],null,["# Log on-premises resources with BindPlane\n\nThis document is one part of a two-part series on extending\n[Cloud Logging](/logging)\nand\n[Cloud Monitoring](/monitoring)\nto include on-premises infrastructure and apps.\n\n- Log on-premises resources with BindPlane (this document): Read about how Logging supports logging from on-premises resources.\n- [Monitor on-premises resources with BindPlane](/architecture/monitoring-on-premises-resources-with-bindplane): Read about how Monitoring supports monitoring of on-premises resources.\n\nYou might consider using Logging and Monitoring\nfor logging and monitoring of your on-premises resources for the following\nreasons:\n\n- You want a temporary solution while you move infrastructure to Google Cloud and you want to log and monitor your on-premises resources until they're decommissioned.\n- You might have a diverse computing environment with multiple clouds and on-premises resources.\n\nIn either case, with the Logging and Monitoring\nAPIs and\n[BindPlane](https://observiq.com/solutions),\nyou can gain visibility into your on-premises resources. This document is\nintended for DevOps practitioners, managers, and executives who are interested\nin a logging strategy for resources in Google Cloud and their remaining\non-premises infrastructure and apps.\n\nIngesting logs with Logging\n---------------------------\n\nYou can get logs into Logging by using the API in two supported\nways:\n\n- Use BindPlane from observIQ to ingest logs from your on-premises or other cloud sources.\n- Use the Cloud Logging API directly from your app or by using a custom agent.\n\n### Using BindPlane to ingest Logging logs\n\nThe following diagram shows the architecture of how BindPlane ingests logs and\nthen how those logs are ingested into Logging.\n\nBindPlane enables users to remotely deploy and manage agents on the\nhosts they want to gather logs from. For more information, read about\n[the architecture of BindPlane](https://observiq.com/docs/going-to-production/bindplane/architecture/architecture).\nThis option requires the least amount of effort to deploy because it requires\nconfiguration to set up rather than development.\n\nAdvantages:\n\n- Requires configuration, not development.\n- Included in the cost of using [Logging](/stackdriver/pricing).\n- Is a supported configuration by Logging product and support.\n- Can extend to logs not provided by the default configuration.\n\nDisadvantages:\n\n- Requires the use of a third-party tool.\n- Might need to provide a custom configuration if the log source isn't provided by default. The provided list of logs is available in [Sources](https://observiq.com/docs/resources/sources).\n\n### Using the Logging API directly\n\nThe following diagram shows the architecture of how logs are collected by\ninstrumentation and ingested into Logging.\n\nUsing the APIs directly means that you need to instrument your applications to\nsend logs directly to the API or develop a custom agent to send logs to the API.\nThis is the option that requires the highest level of effort because it requires\ndevelopment effort.\n\nAdvantages:\n\n- Provides flexibility because you can implement the instrumentation with client logging libraries.\n\nDisadvantages:\n\n- Requires separate solution for infrastructure logs, such as a custom agent.\n- Requires code instrumentation, which might mean higher cost to implement.\n- Requires the use of batching and other scalable ingestion techniques for proper ingestion performance.\n- Support is provided for the Logging API only, not custom-developed code.\n\nUsing BindPlane\n---------------\n\nThis document covers using BindPlane from observIQ to ingest logs\ninto Logging. Because it's included in the cost of\nLogging, BindPlane doesn't require development and provides a\nproduct-supported solution.\n\n### Agents, sources, and destinations\n\nFor detailed information about agents, sources, and destinations, see\nthe BindPlane [Quickstart\nGuide](https://docs.bindplane.observiq.com/docs/getting-started).\n\n### Example use case\n\nEnterprise customers use BindPlane to ingest logs in the following\non-premises logging scenarios:\n\n1. Custom parsing and filtering of log data from custom application logs.\n2. Collection of operating-system events from Linux or Windows virtual machines.\n3. Ingestion of syslog streams from network or other compatible devices.\n4. Collection of Kubernetes system and application logs.\n\n### Send logs from on-premises to Logging\n\nAfter you set up BindPlane and start sending logs, those logs are sent to\nLogging. To view, process, and export logs, go to the\n[Google Cloud console](https://console.cloud.google.com/logs/query).\nThe logs are listed as `generic_node` or `generic_task`resource types. For\nmore information about the labels included in each resource type, see the\n[Logging resource list](/logging/docs/api/v2/resource-list).\n\nCloud Logging supports non-Cloud Logging logs through the\nuse of two resource types:\n\n- **Generic Node**: Identifies a machine or other computational resource for which no other resource type is applicable. The label values must uniquely identify the node.\n- **Generic Task**: Identifies an app process for which no other resource is applicable, such as a process scheduled by a custom orchestration system. The label values must uniquely identify the task.\n\n### View logs in Logging\n\nOn the [Logs Explorer page](https://console.cloud.google.com/logs/query), the **All resources**\nlist includes **Generic Node** as a resource type.\n\nThe list of logs that appear on the page were captured as the `generic_node` resource type.\nExpand a row to see log entry details.\n\nThe log entries use a\n[structured logging](/logging/docs/structured-logging)\nformat, which provides a richer format for searching the logs because the log\npayload is stored as a `jsonPayload`. The structured logging format makes logs\nmore accessible because you can use the fields in the payload as a part of\nthe search. The BindPlane agent provides a mapping from the original log\nentry to the structured log entry in Logging.\n\nConclusion\n----------\n\nWith logs available in Logging, you can take advantage of the\nfull use of the Logging features. Logs appear in the\nGoogle Cloud console. You can export logs with Logging exports\nand use them to create metrics and alerts in Monitoring by using\n[logs-based metrics](/logging/docs/logs-based-metrics).\n\nWhat's next\n-----------\n\n- [Logging and Monitoring](/stackdriver)\n- [BindPlane set-up instructions for Cloud Monitoring and Logging](https://observiq.com/docs/resources/destinations/google-cloud)\n- [Set up logs-based metrics in Logging](/logging/docs/logs-based-metrics)\n- For more reference architectures, diagrams, and best practices, explore the [Cloud Architecture Center](/architecture)."]]