1. samba_exporter(1)
  2. samba_exporter(1)

NAME

samba_exporter - part of the samba-exporter package

SYNOPSIS

samba_exporter options

DESCRIPTION

samba_exporter The prometheus exporter part of the samba-exporter package.

The tool is usually stated as daemon by systemd as samba_exporter.service.

It communicates with the samba_statusd.service using the named pipes /run/samba_exporter.request.pipe and /run/samba_exporter.response.pipe.

samba-exporter package

The samba-exporter package works as a prometheus exporter for statistic data of the samba file server.

It uses smbstatus and the proc fs to collect the data and converts the result into prometheus style data. The prometheus style data can be requested manually on port 9922 using a http client. Or a prometheus database sever can be configured to collect the data by scraping port 9922 on the samba server.

The samba-exporter package has two main components running as daemons:

See https://imker25.github.io/samba_exporter/UserDocs/Concept/ for more details.

OPTIONS

You might want to use one of the following optional parameters.

To change the behavior of the samba_exporter service update the /etc/default/samba_exporter according to your needs. You can add any option shown in the help output of samba_exporter to the ARGS variable.

You may not want to start the service with arguments that will exit before listening starts like -test-pipe, -help or -print-version.
The service will start with -web.listen-address=127.0.0.1:9922 by default, in case your prometheus server is running on a different machine you need to change this.
/etc/default/samba_exporter includes some examples.

EXAMPLES

To stop, start or restart the service use systemctl, e. g.:
sudo systemctl stop samba_exporter

To read the log output use journalctl, e. g.:
sudo journalctl -u samba_exporter.

Remark: Due to the services dependencies samba_exporter service stops whenever samba_statusd stops. And samba_statusd always starts when samba_exporter is started if not already running.

Exported values

The following values are exported by default:

smbd in cluster mode

The values of samba_client_* and samba_process_per_client_count may contain no valid data when monitoring a smbd running in cluster mode. When running in this mode the values of uid and gid may exported in labels are shown as -1 since smbstatus -L gives only anonymous data in this case. Another consequence of this fact is that samba_individual_user_count may show wrong values as well.

But when running in cluster mode the following additional metrics are exported:

Files

BUGS

See https://github.com/imker25/samba_exporter/issues
In case you found a new bug please also report as github issue on the projects page.

Konwn issues

  1. While samba_exporter can work with files that contains spaces in the path and with shares that contain spaces in the name it can not work with shares that contain spaces in the path.
    Example: It is fine to have a share named share with spaces, but it's a problem to export statistics if the shared folder is /srv/shares/with spaces/

samba_exporter is Copyright (C) 2021 Tobias Zellner tobi@backfraki.de

SEE ALSO

samba_statusd(1), start_samba_statusd(1)

  1. July 2024
  2. samba_exporter(1)