https://github.com/gandi/ctld_exporter
Prometheus exporter for FreeBSD CTL daemon
https://github.com/gandi/ctld_exporter
freebsd iscsi prometheus
Last synced: about 1 year ago
JSON representation
Prometheus exporter for FreeBSD CTL daemon
- Host: GitHub
- URL: https://github.com/gandi/ctld_exporter
- Owner: Gandi
- License: other
- Created: 2019-04-15T11:36:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-19T06:39:52.000Z (almost 3 years ago)
- Last Synced: 2025-04-12T03:14:56.651Z (about 1 year ago)
- Topics: freebsd, iscsi, prometheus
- Language: Go
- Size: 1.34 MB
- Stars: 3
- Watchers: 8
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ctld Exporter
Prometheus exporter for [ctld](https://www.freebsd.org/cgi/man.cgi?query=ctld&sektion=8) (CAM Target Layer / iSCSI target daemon)
This exporter uses CGO to get the data (part of the C code is taken from [ctlstat](https://www.freebsd.org/cgi/man.cgi?query=ctlstat&sektion=8) and [ctladm](https://www.freebsd.org/cgi/man.cgi?query=ctladm&sektion=8)). It is planned to remove CGO use in future version.
The exported metrics are the data available using [ctlstat](https://www.freebsd.org/cgi/man.cgi?query=ctlstat&sektion=8) and matched against
target and LUN id within that target.
## Installation
You can build the latest version using Go v1.11+ on FreeBSD via `go get`:
```
go get -u github.com/Gandi/ctld_exporter
```
## Usage
```
usage: ctld_exporter []
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
--web.listen-address=":9572"
Address on which to expose metrics and web interface.
--web.telemetry-path="/metrics"
Path under which to expose metrics.
--log.level="info" Only log messages with the given severity or above. Valid levels: [debug, info,
warn, error, fatal]
--log.format="logger:stderr"
Set the log target and format. Example: "logger:syslog?appname=bob&local=7" or
"logger:stdout?json=true"
--version Show application version.
```
## Caveats
This exporter NEEDS to be build on FreeBSD with access to core source (expected location is `/usr/src/`).
The exporter must have r/w access to `/dev/cam/ctl` thus needing root privileges.