ZC-AUTH(1) - General Commands Manual
NAME
zc-auth - authenticate to a zabbix server
SYNOPSIS
zc auth [-p password] [-u user] url
DESCRIPTION
zc-auth is used for starting a new session with a zabbix server. After authenticating to the server, the URL and the authentication token are stored in an authentication context file for being used in subsequent operations.
Logging out from the server is done by calling zc-close(1).
Options are as follow:
-p password
Password to use for the authentication. "zabbix" by default.
-u user
User to use for the authentication. "Admin" by default.
ENVIRONMENT
ZC_CTX
Context environment variable.
FILES
$HOME/.zc.d
Authentication contexts directory.
$HOME/.zc.d/default
Default authentication context.
EXIT STATUS
The zc-auth utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
Authenticate to "localhost" with default username and password and store the session informations setting the "local" authentication context:
$ zc -c local auth http://localhost/zabbix/api_jsonrpc.php
Do the same operations as the previous one, but by exporting the
ZC_CTX
environment variable first:
$ export ZC_CTX=local
$ zc auth http://localhost/zabbix/api_jsonrpc.php
Authenticate to the "bork" zabbix server, saving the session in the default context with username "foo" and password "bar"
$ zc auth -u foo -p bar http://bork/zabbix/api_jsonrpc.php
SEE ALSO
zc-close(1)
AUTHORS
Andrea Biscuola <a@abiscuola.com>
OpenBSD 6.9 - November 27, 2019