Skip to content

Commit f6bcad1

Browse files
author
root
committed
replace monitor agent
1 parent 2a9f62b commit f6bcad1

84 files changed

Lines changed: 4617 additions & 4066 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Note.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,6 @@ ports tab 不稳定,经常打开显示 somethins wrong
148148

149149

150150
addons 的 netdata restart 报错
151-
addons 针对于没有安装的服务器,打开超过10s才显示数据
151+
Server Terminal 退出连接后再重连,就会失败
152+
153+
crontab list 保存不住

backend/cmd/openapi/gen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ func methodBlock(method, path, tag, auth string, queryParams []string, queryRequ
13211321
fmt.Fprintf(&buf, " requestBody:\n")
13221322
fmt.Fprintf(&buf, " required: true\n")
13231323
fmt.Fprintf(&buf, " content:\n")
1324-
fmt.Fprintf(&buf, " application/x-protobuf:\n")
1324+
fmt.Fprintf(&buf, " text/plain:\n")
13251325
fmt.Fprintf(&buf, " schema:\n")
13261326
fmt.Fprintf(&buf, " type: string\n")
13271327
fmt.Fprintf(&buf, " format: binary\n")

backend/docs/openapi/api.yaml

Lines changed: 6 additions & 205 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ tags:
5555
name: Resource
5656
- description: Secret storage, rotation, resolve, and reveal APIs.
5757
name: Secrets
58-
- description: Server registry CRUD and remote operations APIs for connectivity, power, cron, ports, monitor-agent deployment, and systemd management.
58+
- description: Server registry CRUD and remote operations APIs for connectivity, power, cron, ports, and systemd management.
5959
name: Servers
6060
- description: Service instance catalog and template APIs for managed external services.
6161
name: Service Instances
@@ -305,36 +305,6 @@ components:
305305
path:
306306
type: string
307307
type: object
308-
MonitorAgentDeployRequest:
309-
properties:
310-
apposBaseUrl:
311-
type: string
312-
type: object
313-
MonitorAgentDeployResponse:
314-
properties:
315-
binary_path:
316-
type: string
317-
config_path:
318-
type: string
319-
output:
320-
type: string
321-
packaged_version:
322-
type: string
323-
server_id:
324-
type: string
325-
service:
326-
type: string
327-
status:
328-
type: string
329-
status_text:
330-
type: string
331-
systemd:
332-
additionalProperties:
333-
type: string
334-
type: object
335-
unit_path:
336-
type: string
337-
type: object
338308
MonitorContainerTelemetryResponse:
339309
properties:
340310
items:
@@ -5865,7 +5835,7 @@ paths:
58655835
- Monitoring
58665836
/api/monitor/servers/{id}/container-telemetry:
58675837
get:
5868-
description: Returns latest and time-series telemetry for containers on one managed server. For the current Netdata-backed MVP, AppOS matches telemetry primarily by normalized containerName; containerId remains a request correlation key and fallback when no name is provided.
5838+
description: Returns latest and time-series telemetry for containers on one managed server. AppOS reads stable canonical container metrics and matches telemetry primarily by normalized containerName; containerId remains a request correlation key when no name is provided.
58695839
operationId: get_api_monitor_servers_id_container-telemetry
58705840
parameters:
58715841
- description: server record ID
@@ -6080,81 +6050,20 @@ paths:
60806050
summary: Get monitor target series
60816051
tags:
60826052
- Monitoring
6083-
/api/monitor/telegraf/write:
6084-
post:
6085-
description: Receives Influx line protocol payloads from managed-server Telegraf agents and forwards them to the embedded VictoriaMetrics Influx write endpoint. Authenticate with HTTP Basic Auth where username is the server record ID and password is the per-server monitor agent token issued during managed metrics collector setup.
6086-
operationId: post_api_monitor_telegraf_write
6087-
parameters:
6088-
- description: Basic base64(serverId:monitorAgentToken)
6089-
in: header
6090-
name: Authorization
6091-
required: true
6092-
schema:
6093-
type: string
6094-
requestBody:
6095-
content:
6096-
application/json:
6097-
schema:
6098-
$ref: '#/components/schemas/GenericRequest'
6099-
required: false
6100-
responses:
6101-
"204":
6102-
description: No Content
6103-
"401":
6104-
content:
6105-
application/json:
6106-
schema:
6107-
$ref: '#/components/schemas/MonitorErrorResponse'
6108-
description: Unauthorized
6109-
"413":
6110-
content:
6111-
application/json:
6112-
schema:
6113-
$ref: '#/components/schemas/MonitorErrorResponse'
6114-
description: Payload Too Large
6115-
"502":
6116-
content:
6117-
application/json:
6118-
schema:
6119-
$ref: '#/components/schemas/MonitorErrorResponse'
6120-
description: Bad Gateway
6121-
security:
6122-
- bearerAuth: []
6123-
summary: Write Telegraf metrics
6124-
tags:
6125-
- Monitoring Ingest
61266053
/api/monitor/write:
61276054
post:
6128-
description: Receives Prometheus remote-write protobuf payloads from managed-server Netdata agents. This endpoint is served by the AppOS backend and forwards accepted payloads to the embedded time-series database. Authenticate with HTTP Basic Auth where username is the server record ID and password is the per-server monitor agent token issued during Netdata install/update. Reverse-proxy forwarding headers used elsewhere for agent URL generation are parsed defensively only the first comma-separated host/port value is used and forwarded ports must be numeric.
6055+
description: Receives collector payloads from managed-server monitoring collectors, projects stable AppOS canonical metrics, and forwards the raw payload to the embedded VictoriaMetrics Influx write endpoint. Authenticate with HTTP Basic Auth where username is the server record ID and password is the per-server monitor collector token issued during managed collector setup.
61296056
operationId: post_api_monitor_write
61306057
parameters:
6131-
- description: Basic base64(serverId:monitorAgentToken)
6058+
- description: Basic base64(serverId:monitorCollectorToken)
61326059
in: header
61336060
name: Authorization
61346061
required: true
61356062
schema:
61366063
type: string
6137-
- description: remote-write compression, usually snappy
6138-
in: header
6139-
name: Content-Encoding
6140-
required: false
6141-
schema:
6142-
type: string
6143-
- description: application/x-protobuf
6144-
in: header
6145-
name: Content-Type
6146-
required: true
6147-
schema:
6148-
type: string
6149-
- description: Prometheus remote-write protocol version
6150-
in: header
6151-
name: X-Prometheus-Remote-Write-Version
6152-
required: false
6153-
schema:
6154-
type: string
61556064
requestBody:
61566065
content:
6157-
application/x-protobuf:
6066+
text/plain:
61586067
schema:
61596068
format: binary
61606069
type: string
@@ -6182,7 +6091,7 @@ paths:
61826091
description: Bad Gateway
61836092
security:
61846093
- basicAuth: []
6185-
summary: Write Netdata metrics
6094+
summary: Write monitoring metrics
61866095
tags:
61876096
- Monitoring Ingest
61886097
/api/pipelines:
@@ -9142,114 +9051,6 @@ paths:
91429051
summary: Create or execute servers by serverId ops cron jobs by entryId test
91439052
tags:
91449053
- Servers
9145-
/api/servers/{serverId}/ops/monitor-agent/install:
9146-
post:
9147-
description: Installs and starts the server metrics collector, writes the remote-write configuration, and issues or reuses the per-server monitor-agent token. Optional apposBaseUrl overrides the callback base URL used in the generated collector configuration.
9148-
operationId: post_api_servers_serverid_ops_monitor-agent_install
9149-
parameters:
9150-
- description: server record ID
9151-
in: path
9152-
name: serverId
9153-
required: true
9154-
schema:
9155-
type: string
9156-
requestBody:
9157-
content:
9158-
application/json:
9159-
schema:
9160-
$ref: '#/components/schemas/MonitorAgentDeployRequest'
9161-
description: optional AppOS callback base URL override
9162-
required: false
9163-
responses:
9164-
"200":
9165-
content:
9166-
application/json:
9167-
schema:
9168-
$ref: '#/components/schemas/MonitorAgentDeployResponse'
9169-
description: OK
9170-
"400":
9171-
content:
9172-
application/json:
9173-
schema:
9174-
$ref: '#/components/schemas/MonitorErrorResponse'
9175-
description: Bad Request
9176-
"401":
9177-
content:
9178-
application/json:
9179-
schema:
9180-
$ref: '#/components/schemas/MonitorErrorResponse'
9181-
description: Unauthorized
9182-
"404":
9183-
content:
9184-
application/json:
9185-
schema:
9186-
$ref: '#/components/schemas/MonitorErrorResponse'
9187-
description: Not Found
9188-
"500":
9189-
content:
9190-
application/json:
9191-
schema:
9192-
$ref: '#/components/schemas/MonitorErrorResponse'
9193-
description: Internal Server Error
9194-
security:
9195-
- bearerAuth: []
9196-
summary: Install monitor agent on a managed server
9197-
tags:
9198-
- Servers
9199-
/api/servers/{serverId}/ops/monitor-agent/update:
9200-
post:
9201-
description: Reinstalls the server metrics collector, refreshes the remote-write configuration, and returns current service status details. Optional apposBaseUrl overrides the callback base URL used in the generated collector configuration.
9202-
operationId: post_api_servers_serverid_ops_monitor-agent_update
9203-
parameters:
9204-
- description: server record ID
9205-
in: path
9206-
name: serverId
9207-
required: true
9208-
schema:
9209-
type: string
9210-
requestBody:
9211-
content:
9212-
application/json:
9213-
schema:
9214-
$ref: '#/components/schemas/MonitorAgentDeployRequest'
9215-
description: optional AppOS callback base URL override
9216-
required: false
9217-
responses:
9218-
"200":
9219-
content:
9220-
application/json:
9221-
schema:
9222-
$ref: '#/components/schemas/MonitorAgentDeployResponse'
9223-
description: OK
9224-
"400":
9225-
content:
9226-
application/json:
9227-
schema:
9228-
$ref: '#/components/schemas/MonitorErrorResponse'
9229-
description: Bad Request
9230-
"401":
9231-
content:
9232-
application/json:
9233-
schema:
9234-
$ref: '#/components/schemas/MonitorErrorResponse'
9235-
description: Unauthorized
9236-
"404":
9237-
content:
9238-
application/json:
9239-
schema:
9240-
$ref: '#/components/schemas/MonitorErrorResponse'
9241-
description: Not Found
9242-
"500":
9243-
content:
9244-
application/json:
9245-
schema:
9246-
$ref: '#/components/schemas/MonitorErrorResponse'
9247-
description: Internal Server Error
9248-
security:
9249-
- bearerAuth: []
9250-
summary: Update monitor agent on a managed server
9251-
tags:
9252-
- Servers
92539054
/api/servers/{serverId}/ops/ports:
92549055
get:
92559056
operationId: get_api_servers_serverid_ops_ports

0 commit comments

Comments
 (0)