moni
v0.2.2
https://monibot.io용 명령줄 도구 - 손쉬운 서버 및 애플리케이션 모니터링.
Moni는 Monibot REST API와 상호 작용하는 명령줄 도구입니다. 그것은 익숙하다
Monibot에서 Watchdog 쿼리
Monibot에 감시 하트비트 보내기
Monibot의 쿼리 머신
머신 리소스 사용량 샘플(CPU/메모리/디스크/시계/네트워크)을 모니봇으로 보내기
Monibot에 기계어 텍스트(명령 출력) 보내기
Monibot의 쿼리 측정항목
Monibot에 메트릭 값 보내기
Linux/amd64에서 실행되며 Go로 작성되었습니다. https://go.dev/를 참조하세요.
여기에서 사전 구축된 linux/amd64 바이너리를 다운로드하세요: https://github.com/cvilsmeier/moni/releases/latest
사전 빌드된 바이너리를 다운로드하지 않으려면 명령줄에서 moni를 설치할 수 있습니다.
$ go install github.com/cvilsmeier/moni@latest
사전 빌드된 바이너리를 다운로드하지 않으려면 명령줄에서 moni를 빌드할 수 있습니다.
$ git clone https://github.com/cvilsmeier/moni $ cd moni/ $ CGO_ENABLED=0 go build $ ./moni help
$ moni help Moni - A command line tool for https://monibot.io Usage moni [flags] command Flags -url Monibot URL, default is "https://monibot.io". You can set this also via environment variable MONIBOT_URL. -apiKey Monibot API Key, default is "". You can set this also via environment variable MONIBOT_API_KEY (recommended). You can find your API Key in your profile on https://monibot.io. Note: For security, we recommend that you specify the API Key via MONIBOT_API_KEY, and not via -apiKey flag. The flag will show up in 'ps aux' outputs and can be eavesdropped. -trials Max. Send trials, default is 12. You can set this also via environment variable MONIBOT_TRIALS. -delay Delay between trials, default is 5s. You can set this also via environment variable MONIBOT_DELAY. -v Verbose output, default is false. You can set this also via environment variable MONIBOT_VERBOSE ('true' or 'false'). Commands ping Ping the Monibot API. If an error occurs, moni will print that error. It it succeeds, moni will print nothing. watchdogs List heartbeat watchdogs. watchdog <watchdogId> Get heartbeat watchdog by id. heartbeat <watchdogId> [interval] Send a heartbeat. If interval is not specified, moni sends one heartbeat and exits. If interval is specified, moni will stay in the background and send heartbeats in that interval. Min. interval is 5m. machines List machines. machine <machineId> Get machine by id. sample <machineId> <interval> Send resource usage (load/cpu/mem/disk) samples for machine. Moni consults various files (/proc/loadavg, /proc/cpuinfo, etc.) and commands (/usr/bin/free, /usr/bin/df, etc.) to calculate resource usage. Therefore it currently supports linux only. Moni will stay in background and keep sampling in specified interval. Min. interval is 5m. text <machineId> <filename> Send filename as text for machine. Filename can contain arbitrary text, e.g. arbitrary command outputs. It's used for information only, no logic is associated with texts. Moni will send the file as text and then exit. If an error occurs, moni will print an error message. Otherwise moni will print nothing. Max. filesize is 204800 bytes. metrics List metrics. metric <metricId> Get and print metric info. inc <metricId> <value> Increment a counter metric. Value must be a non-negative 64-bit integer value. set <metricId> <value> Set a gauge metric value. Value must be a non-negative 64-bit integer value. values <metricId> <values> Send histogram metric values. Values is a comma-separated list of 'value:count' pairs. Each value is a non-negative 64-bit integer value, each count is an integer value greater or equal to 1. If count is 1, the ':count' part is optional, so values '13:1,14:1' and '13,14' are sematically equal. A specific value may occur multiple times, its counts will then be added together, so values '13:2,13:2' and '13:4' are sematically equal. config Show config values. version Show moni program version. sdk-version Show the monibot-go SDK version moni was built with. help Show this help page. Exit Codes 0 ok 1 error 2 wrong user input
beat 명령의 이름을 heartbeat로 변경했습니다.
값 업데이트 명령 문서
히스토그램 메트릭 값을 보내기 위한 값 추가 명령
기계 텍스트를 보내기 위한 텍스트 명령 추가
주요 변경 사항: 최소 감시 비트 간격을 5m로 설정
주요 변경 사항: 최소 기계 샘플 간격을 5m로 설정
명령 이름 및 간격 처리 변경
디스크 읽기/쓰기 샘플링 추가
네트워크 수신/전송 샘플링 추가
첫 번째 버전