This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
openai module
editopenai module
editThis functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
This is the openai module.
The openai module supports the standard configuration options that are described in Modules. Here is an example configuration:
metricbeat.modules: - module: openai metricsets: ["usage"] enabled: false period: 1h # # Project API Keys - Multiple API keys can be specified for different projects # api_keys: # - key: "api_key1" # - key: "api_key2" # # API Configuration # ## Base URL for the OpenAI usage API endpoint # api_url: "https://api.openai.com/v1/usage" # ## Custom headers to be included in API requests # headers: # - "k1: v1" # - "k2: v2" ## Rate Limiting Configuration # rate_limit: # limit: 12 # seconds between requests # burst: 1 # max concurrent requests # ## Request Timeout Duration # timeout: 30s # # Data Collection Configuration # collection: # ## Number of days to look back when collecting usage data # lookback_days: 30 # ## Whether to collect usage data in realtime. Defaults to false as how # # OpenAI usage data is collected will end up adding duplicate data to ES # # and also making it harder to do analytics. Best approach is to avoid # # realtime collection and collect only upto last day (in UTC). So, there's # # at most 24h delay. # realtime: false
The following metricsets are available: