diff --git a/hertzbeat-manager/src/main/resources/define/app-ollama.yml b/hertzbeat-manager/src/main/resources/define/app-ollama.yml new file mode 100644 index 00000000000..dd818a27ed7 --- /dev/null +++ b/hertzbeat-manager/src/main/resources/define/app-ollama.yml @@ -0,0 +1,239 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: llm +# The monitoring type eg: linux windows tomcat mysql aws... +app: ollama +# The monitoring i18n name +name: + zh-CN: Ollama + en-US: Ollama + ja-JP: Ollama +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 Ollama 本地大模型服务的版本信息、已安装模型列表和运行中模型进行采集监控。
您可以点击"新增 Ollama"并进行配置,或者选择"更多操作",导入已有配置。 + en-US: HertzBeat monitors Ollama local LLM service including version info, installed models and running models.
You can click the "New Ollama" button and proceed with the configuration or import an existing setup through the "More Actions" menu. + zh-TW: HertzBeat 對 Ollama 本地大模型服務的版本資訊、已安裝模型列表和運行中模型進行採集監控。
您可以點擊"新增 Ollama"並進行配置,或者選擇"更多操作",導入已有配置。 + ja-JP: HertzBeat は Ollama ローカル LLM サービスのバージョン情報、インストール済みモデル一覧、実行中モデルを監視します。
新規 Ollama」をクリックして設定できます。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/ollama + en-US: https://hertzbeat.apache.org/docs/help/ollama +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + ja-JP: 目標ホスト + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + ja-JP: ポート + type: number + range: '[0,65535]' + required: true + defaultValue: 11434 + - field: ssl + name: + zh-CN: SSL连接 + en-US: SSL + ja-JP: SSL利用 + type: boolean + required: false + - field: apiKey + name: + zh-CN: API Key + en-US: API Key + ja-JP: API キー + type: text + required: false +# collect metrics config list +metrics: + - name: version_info + i18n: + zh-CN: 版本信息 + en-US: Version Info + ja-JP: バージョン情報 + priority: 0 + fields: + - field: version + type: 1 + i18n: + zh-CN: 版本 + en-US: Version + ja-JP: バージョン + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + url: /api/version + method: GET + ssl: ^_^ssl^_^ + authorization: + # http auth type: Basic Auth, Digest Auth, Bearer Token + type: Bearer Token + bearerTokenToken: ^_^apiKey^_^ + parseType: jsonPath + parseScript: '$' + + - name: models + i18n: + zh-CN: 已安装模型 + en-US: Installed Models + ja-JP: インストール済みモデル + priority: 1 + fields: + - field: name + type: 1 + label: true + i18n: + zh-CN: 模型名称 + en-US: Model Name + ja-JP: モデル名 + - field: model_size + type: 0 + unit: MB + i18n: + zh-CN: 模型大小 + en-US: Model Size + ja-JP: モデルサイズ + - field: parameter_size + type: 1 + i18n: + zh-CN: 参数规模 + en-US: Parameter Size + ja-JP: パラメータサイズ + - field: quantization_level + type: 1 + i18n: + zh-CN: 量化级别 + en-US: Quantization Level + ja-JP: 量子化レベル + - field: family + type: 1 + i18n: + zh-CN: 模型家族 + en-US: Model Family + ja-JP: モデルファミリー + - field: format + type: 1 + i18n: + zh-CN: 格式 + en-US: Format + ja-JP: フォーマット + - field: modified_at + type: 1 + i18n: + zh-CN: 修改时间 + en-US: Modified At + ja-JP: 更新日時 + aliasFields: + - name + - $.size + - $.details.parameter_size + - $.details.quantization_level + - $.details.family + - $.details.format + - modified_at + calculates: + - name = name + - model_size = $.size + - parameter_size = $.details.parameter_size + - quantization_level = $.details.quantization_level + - family = $.details.family + - format = $.details.format + - modified_at = modified_at + units: + - model_size=B->MB + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + url: /api/tags + method: GET + ssl: ^_^ssl^_^ + authorization: + type: Bearer Token + bearerTokenToken: ^_^apiKey^_^ + parseType: jsonPath + parseScript: '$.models.*' + + - name: running_models + i18n: + zh-CN: 运行中模型 + en-US: Running Models + ja-JP: 実行中モデル + priority: 2 + fields: + - field: name + type: 1 + label: true + i18n: + zh-CN: 模型名称 + en-US: Model Name + ja-JP: モデル名 + - field: model_size + type: 0 + unit: MB + i18n: + zh-CN: 模型大小 + en-US: Model Size + ja-JP: モデルサイズ + - field: size_vram + type: 0 + unit: MB + i18n: + zh-CN: VRAM占用 + en-US: VRAM Size + ja-JP: VRAMサイズ + - field: expires_at + type: 1 + i18n: + zh-CN: 过期时间 + en-US: Expires At + ja-JP: 有効期限 + aliasFields: + - name + - $.size + - size_vram + - expires_at + calculates: + - name = name + - model_size = $.size + - size_vram = size_vram + - expires_at = expires_at + units: + - model_size=B->MB + - size_vram=B->MB + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + url: /api/ps + method: GET + ssl: ^_^ssl^_^ + authorization: + type: Bearer Token + bearerTokenToken: ^_^apiKey^_^ + parseType: jsonPath + parseScript: '$.models.*' diff --git a/home/docs/help/ollama.md b/home/docs/help/ollama.md new file mode 100644 index 00000000000..88a0a9fac00 --- /dev/null +++ b/home/docs/help/ollama.md @@ -0,0 +1,58 @@ +--- +id: ollama +title: Monitoring Ollama Local LLM Service +sidebar_label: Ollama +keywords: [ Open Source Monitoring System, Open Source LLM Monitoring, Ollama Monitoring ] +--- + +> HertzBeat monitors Ollama local LLM service including version info, installed models and running models. + +### Preparation + +Ensure that Ollama is running and the API is accessible. By default, Ollama listens on port `11434`. + +If Ollama is running on a remote server, you may need to set the `OLLAMA_HOST` environment variable to `0.0.0.0` to +allow external access. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|--------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | The target IPV4, IPV6 or domain name of the Ollama service. Note: without protocol header (eg: https://, http://). | +| Task Name | The name that identifies this monitoring task, which must be unique. | +| Port | The port Ollama service is listening on, default is 11434. | +| SSL | Whether to use HTTPS to connect to the Ollama service. | +| API Key | To directly access the API key of ollama.com. | +| Collector | Configure which collector is used to schedule data collection for this monitoring. | +| Monitoring Interval | The interval for periodically collecting data, in seconds. The minimum interval that can be set is 30 seconds. | +| Bound Tags | Tags for categorizing and managing monitoring resources. | +| Description/Remarks | Additional remarks to identify and describe this monitoring. Users can add notes here. | + +### Collection Metrics + +#### Metric Set: Version Info + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|------------------------------------| +| Version | None | The version of the Ollama service. | + +#### Metric Set: Installed Models + +| Metric Name | Metric Unit | Metric Description | +|--------------------|-------------|---------------------------------------------------------| +| Model Name | None | The name of the installed model. | +| Model Size | MB | The size of the model file. | +| Parameter Size | None | The parameter scale of the model (e.g., 7B, 13B). | +| Quantization Level | None | The quantization level of the model (e.g., Q4_0, Q8_0). | +| Model Family | None | The model family (e.g., llama, qwen). | +| Format | None | The model format (e.g., gguf). | +| Modified At | None | The last modified time of the model. | + +#### Metric Set: Running Models + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|-------------------------------------------------------| +| Model Name | None | The name of the running model. | +| Model Size | MB | The size of the model in memory. | +| VRAM Size | MB | The VRAM occupied by the model. | +| Expires At | None | The time when the model will be unloaded from memory. | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/ollama.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/ollama.md new file mode 100644 index 00000000000..2c8171a81e4 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/ollama.md @@ -0,0 +1,57 @@ +--- +id: ollama +title: 监控:Ollama 本地大模型服务 +sidebar_label: Ollama +keywords: [ 开源监控系统, 开源LLM监控, Ollama监控 ] +--- + +> HertzBeat 对 Ollama 本地大模型服务的版本信息、已安装模型列表和运行中模型进行采集监控。 + +### 准备工作 + +确保 Ollama 已运行且 API 可访问。默认情况下,Ollama 监听端口为 `11434`。 + +如果 Ollama 运行在远程服务器上,可能需要设置 `OLLAMA_HOST` 环境变量为 `0.0.0.0` 以允许外部访问。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------------------| +| 监控Host | 被监控的 Ollama 服务的对端 IPV4、IPV6 或域名。注意:不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Ollama 服务监听的端口,默认为 11434。 | +| SSL连接 | 是否通过 HTTPS 连接 Ollama 服务。 | +| 采集器 | 配置此监控使用哪台采集器调度采集。 | +| 密钥 | 要直接访问 ollama.com 的 API密钥 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:版本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|----------------| +| 版本 | 无 | Ollama 服务的版本号。 | + +#### 指标集合:已安装模型 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|-----------------------| +| 模型名称 | 无 | 已安装模型的名称。 | +| 模型大小 | MB | 模型文件的大小。 | +| 参数规模 | 无 | 模型的参数规模(如 7B、13B)。 | +| 量化级别 | 无 | 模型的量化级别(如 Q4_0、Q8_0)。 | +| 模型家族 | 无 | 模型所属家族(如 llama、qwen)。 | +| 格式 | 无 | 模型格式(如 gguf)。 | +| 修改时间 | 无 | 模型最后修改时间。 | + +#### 指标集合:运行中模型 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|--------------| +| 模型名称 | 无 | 运行中模型的名称。 | +| 模型大小 | MB | 模型在内存中的大小。 | +| VRAM占用 | MB | 模型占用的显存大小。 | +| 过期时间 | 无 | 模型从内存中卸载的时间。 | diff --git a/home/sidebars.json b/home/sidebars.json index bda68ea497e..24c235bc785 100755 --- a/home/sidebars.json +++ b/home/sidebars.json @@ -294,7 +294,7 @@ { "type": "category", "label": "llm", - "items": ["help/openai","help/deepseek"] + "items": ["help/openai","help/deepseek","help/ollama"] }, { "type": "category",