Skip to content

Commit

Permalink
* Update documentation to version 1.4.0
Browse files Browse the repository at this point in the history
* Update version to 1.4.0
* Update copyright year
  • Loading branch information
rafaelma committed Sep 19, 2015
1 parent 6d471f0 commit b929bcf
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 38 deletions.
2 changes: 1 addition & 1 deletion bin/zabbix-cli
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Authors:
# rafael@postgresql.org.es / http://www.postgresql.org.es/
#
# Copyright (c) 2014 USIT-University of Oslo
# Copyright (c) 2014-2015 USIT-University of Oslo
#
# This file is part of Zabbix-cli
# https://github.com/rafaelma/zabbix-cli
Expand Down
2 changes: 1 addition & 1 deletion bin/zabbix-cli-bulk-execution
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Authors:
# rafael@postgresql.org.es / http://www.postgresql.org.es/
#
# Copyright (c) 2014 USIT-University of Oslo
# Copyright (c) 2014-2015 USIT-University of Oslo
#
# This file is part of Zabbix-cli
# https://github.com/rafaelma/zabbix-cli
Expand Down
81 changes: 52 additions & 29 deletions docs/manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Zabbix-CLI
=====================================

|
| Version-1.3.1
| Version-1.4.0
|
| Rafael Martinez Guerrero (University of Oslo)
| E-mail: rafael@postgresql.org.es
Expand Down Expand Up @@ -100,6 +100,7 @@ Configuration file
Zabbix-CLI needs a configuration file to work. It will look for the
file in this order:

* Config file defined with ``--config`` or ``-c`` when starting ``zabbix-cli``
* ``$HOME/.zabbix-cli/zabbix-cli.conf``
* ``/etc/zabbix-cli/zabbix-cli.conf``
* ``/etc/zabbix-cli.conf``
Expand Down Expand Up @@ -148,7 +149,9 @@ Authentication token file
-------------------------

The file ``$HOME/.zabbix-cli_auth_token`` will be created with
information about the API-auth-token from the last login.
information about the API-auth-token from the last login if the
parameter ``use_auth_token_file=ON`` is defined in the configuration
file.

The information in this file will be used, if we can, to avoid having to
write the username and password everytime you use ``zabbix-cli``. This
Expand Down Expand Up @@ -183,28 +186,29 @@ The Zabbix-CLI interactive shell can be started by running the program
Documented commands (type help <topic>):
========================================
EOF remove_user_from_usergroup update_host_proxy
EOF remove_user_from_usergroup
add_host_to_hostgroup shell
add_user_to_usergroup show_alarms
add_usergroup_permissions show_global_macros
clear show_history
create_host show_host
create_host_interface show_host_inventory
create_hostgroup show_host_usermacros
create_user show_hostgroup
create_usergroup show_hostgroups
define_global_macro show_hosts
define_host_usermacro show_items
create_notification_user show_hostgroup
create_user show_hostgroups
create_usergroup show_hosts
define_global_macro show_items
define_host_monitoring_status show_template
export_configuration show_templates
import_configuration show_triggers
link_template_to_host show_usergroup
load_balance_proxy_hosts show_usergroups
move_proxy_hosts show_usermacro_host_list
quit show_usermacro_template_list
remove_host show_users
remove_host_from_hostgroup unlink_template_from_host
remove_user update_host_inventory
define_host_usermacro show_templates
export_configuration show_triggers
import_configuration show_usergroup
link_template_to_host show_usergroups
load_balance_proxy_hosts show_usermacro_host_list
move_proxy_hosts show_usermacro_template_list
quit show_users
remove_host unlink_template_from_host
remove_host_from_hostgroup update_host_inventory
remove_user update_host_proxy

Miscellaneous help topics:
==========================
Expand All @@ -215,13 +219,14 @@ The Zabbix-CLI interactive shell can be started by running the program
help

**NOTE:** It is possible to use Zabbix-CLI in a non-interactive modus
by running ``/usr/bin/zabbix-cli`` with a command as a parameter in
the OS shell. This can be used to run ``zabbix-cli`` commands from shell
scripts or other programs .e.g.
by running ``/usr/bin/zabbix-cli`` with the parameter ``--command
<zabbix_command>`` or ``-C <zabbix_command>`` in the OS shell. This
can be used to run ``zabbix-cli`` commands from shell scripts or other
programs .e.g.

::

[user@host]# zabbix-cli show_usergroups
[user@host]# zabbix-cli -C "show_usergroups"

+---------+---------------------------+--------------------+-------------+
| GroupID | Name | GUI access | Status |
Expand All @@ -238,13 +243,13 @@ scripts or other programs .e.g.
| 14 | Zabbix core | System default (0) | Enable (0) |
+---------+---------------------------+--------------------+-------------+

One can also use the parameters ``--use-csv-format`` or
``--use-json-format`` when running ``zabbix-cli`` in non-interactive
One can also use the parameters ``--output csv`` or
``--output json`` when running ``zabbix-cli`` in non-interactive
modus to generate an output in CSV or JSON format.

::

[user@host ~]# zabbix-cli --use-csv-format show_usergroups
[user@host ~]# zabbix-cli --output csv show_usergroups

"13","DBA","System default (0)","Enable (0)"
"9","Disabled","System default (0)","Disable (1)"
Expand All @@ -264,7 +269,7 @@ or special characters for the shell.e.g.

::

[user@host ~]# zabbix-cli show_host "*" "\'available\':\'2\',\'maintenance_status\':\'1\'"
[user@host ~]# zabbix-cli -C "show_host * \"'available':'2','maintenance_status':'1'\" "

+--------+----------------------+-------------------------+-----------------------------------+--------------------+-----------------+-----------------+---------------+
| HostID | Name | Hostgroups | Templates | Applications | Zabbix agent | Maintenance | Status |
Expand Down Expand Up @@ -297,11 +302,6 @@ or special characters for the shell.e.g.
+--------+----------------------+-------------------------+-----------------------------------+--------------------+-----------------+-----------------+---------------+


The parameter ``--use-colors`` in non-interactive and interactive
modus will activate the use of colors when showing alarms with the
command show_alarms.


add_host_to_hostgroup
---------------------

Expand Down Expand Up @@ -475,6 +475,29 @@ Parameters:
* **[group name]:** Name of the hostgroup


create_notification_user
------------------------

This command creates a notification user. These users are used to send
notifications when an zabbix event happens.

They are needed because sometimes a system administrator group needs
to send different notifications to multiple different
medias,e.g. alarm-type-1 to email-1 and alarm-type-2 to email-2, but
not alarm-type-1 to email-1 and email-2

::
create_notification_user [sendto]
[mediatype]
Parameters:

* **[sendto]**: E-mail address or SMS number
* **[mediatype]**: One of the media types names defined in your Zabbix
installation, e.g. Email, SMS


create_user
-----------

Expand Down
2 changes: 1 addition & 1 deletion etc/zabbix-cli.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; Authors:
; rafael@postgresql.org.es / http://www.postgresql.org.es/
;
; Copyright (c) 2014 USIT-University of Oslo
; Copyright (c) 2014-2015 USIT-University of Oslo
;
; This file is part of Zabbix-CLI
; https://github.com/rafaelma/zabbix-cli
Expand Down
10 changes: 6 additions & 4 deletions zabbix_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Authors:
# rafael@postgresql.org.es / http://www.postgresql.org.es/
#
# Copyright (c) 2014 USIT-University of Oslo
# Copyright (c) 2014-2015 USIT-University of Oslo
#
# This file is part of Zabbix-CLI
# https://github.com/rafaelma/zabbix-cli
Expand Down Expand Up @@ -2947,16 +2947,18 @@ def do_create_notification_user(self,args):
email-2, but not alarm-type-1 to email-1 and email-2
COMMAND:
create_user [sendto]
[mediatype]
create_notification_user [sendto]
[mediatype]
[sendto]
--------
E-mail address or SMS number
[mediatype]
-----------
One of the media types names defined in Zabbix, e.g. Email, SMS
One of the media types names defined in your Zabbix
installation, e.g. Email, SMS
'''

# Default: md5 value of a random int >1 and <1000000
Expand Down
2 changes: 1 addition & 1 deletion zabbix_cli/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Authors:
# rafael@postgresql.org.es / http://www.postgresql.org.es/
#
# Copyright (c) 2014 USIT-University of Oslo
# Copyright (c) 2014-2015 USIT-University of Oslo
#
# This file is part of Zabbix-CLI
# https://github.com/rafaelma/zabbix-cli
Expand Down
2 changes: 1 addition & 1 deletion zabbix_cli/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env python
__version__ = '1.3.1'
__version__ = '1.4.0'

0 comments on commit b929bcf

Please sign in to comment.