<?xml version=“1.0” encoding=“ISO-8859-15”?>

<!– GPL 2.0 www.gnu.org/licenses/gpl-2.0.html Zabbix CLI Tool and associated files Copyright (C) 2009,2010 Andrew Nelson nelsonab(at)red-tux(dot)net

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

########################################## Subversion information $Id: help.xml 361 2011-12-19 00:21:52Z richlv $ $Revision: 361 $ ##########################################

Zabcon help file

All help items except for "help" are organized alphabetically.

–>

<!– 80 Col Marker ######################################################## –>

<zabcon_help>

<help language="english">
<item command="help">

General help Prompt The prompt has the following format &quot;XXs &gt;&quot; XX = number representing the current debug level, one or two digits s = + or - symbol representing current login state.

+ represents a current login

Command help &lt;&gt; Mandatory argument/command () Optional argument/command help - Show this help list info - show information about current state exit - quit quit - quit history - Show current history list login &lt;server&gt; &lt;username&gt; &lt;password&gt;

- server is a fully qualified url

load configuration &lt;config file&gt;

- loads configuration settings from a file and logs
  into server

import &lt;file&gt; - Import configuration from an XML file set &lt;command&gt; - Sets various variables

debug &lt;num&gt;     - Sets the debug level to &lt;num&gt;   **Deprecated**
prompt          - Prompt related commands
  debug &lt;1/0&gt;   - Turn the debug portion of the prompt on or off
lines &lt;num&gt;     - Set the screen height.  0 turns off Screen pausing

Variables: Zabcon has basic variable support, the commands are as follows set var/env - sets a variable or variables show var/env - shows the currently set variables unset var - unsets a variable

To use a variable preface the name with a $ character such as $variable. If the $ character is escaped with a \ variable substitution will not occur. Variables will be substituted if they are found within string blocks enclosed by either single or double quotes.

One variable is automatically assigned upon login, auth. This is the authorization token from the server.

Environmental variables cannot be used for substitution at this time, they control the various aspects behind the scenes such as debug level. The current list of environment variables is: debug, language, sheight (screen height)

To view the commands which require a valid login use the command:

help commands

Zabcon Copyright (C) 2009,2010 Andrew Nelson. Zabcon comes with ABSOLUTELY NO WARRANTY; for details see the text of the GNU General Public License 2.0 at www.gnu.org/licenses/gpl-2.0.html

</item>

<!– 80 Col Marker ######################################################## –>

<item command="help_commands">

Help Commands The following commands require a valid login

To get help on a specific command type: help &lt;command&gt;

For instance “help get user” would return help for the “get user” command.

&lt;&gt; Mandatory argument/command () Optional argument/command

get user - returns a list of all users get host - returns a list of hosts get item - returns a list of items

hostids=&lt;num&gt;   - returns a list of items for host
extendoutput=true
                - displays more information

add user - Adds a user to Zabbix

without parameters causes help message to be displayed

add host - Add a host add host group - Adds a host group add item - Add an item

delete user &lt;num&gt; - Deletes user with uid=num delete host - Deletes a host

raw api - Allows for raw api calls, many of the underlying details

are handled by this call

raw json - Allows for raw json calls to the API, this allows for a

                  much more direct API call than the "raw api" call
                  No syntax checking is performed!
</item>

<!– 80 Col Marker ######################################################## –>

<item command="add_host">

Add Host adds a host to the Zabbix server.

Required arguments:

host, port, ip and/or dns, status, proxy_hostid, groups, useip

Optional arguments:

available, disable_until, status, templates
maintenanceid, maintenance_from, maintenance_status, maintenance_type,
useipmi, ipmi_authtype, ipmi_available, ipmi_disable_until, ipmi_errors_from,
ipmi_ip, ipmi_password, ipmi_port, ipmi_privilege, ipmi_username,
snmp_available, snmp_disable_until, snmp_errors_from,
outbytes, error, lastaccess, errors_from, inbytes

example:

add host host=servername dns=host.dom port=10050 proxy_hostid=0 groups=[{groupid=1}] useip=0

Adding a host to a template:
add host host=servername dns=host.dom port=10050 proxy_hostid=0 groups=[{groupid=1}] useip=0 templates=[{templateid=10001}]

</item>

<!– 80 Col Marker ######################################################## –>

<item command="delete_host">

Delete Host takes a list of host ids or one host id example: delete host id=1,2,3

        delete host id=1
</item>

<!– 80 Col Marker ######################################################## –>

<item command="add_item">

Add Item syntax: add item type=active hostid=num description=“some text” key=“item.key”

valid parameters:

hostid, snmpv3_securitylevel, snmp_community, publickey, delta, history,
key, snmp_oid, delay_flex, multiplier, delay, mtime, username, authtype,
data_type, ipmi_sensor,snmpv3_authpassphrase, prevorgvalue, units, trends,
snmp_port, formula, type, params, logtimefmt, snmpv3_securityname,
trapper_hosts, description, password, snmpv3_privpassphrase,
status, privatekey, valuemapid, templateid, value_type, groups

valid values for 'type':

active, passive, trapper
</item>

<!– 80 Col Marker ######################################################## –>

<item command="add_user">

Add User requires arguments, valid fields are: name, surname, alias, passwd, url, autologin, autologout, lang, theme, refresh rows_per_page, type example: add user name=someone alias=username passwd=pass autologout=0

</item>

<!– 80 Col Marker ######################################################## –>

<item command="add_user_media">

Adds a media type to a user

Example:

add user media userid=33 mediatypeid=1 sendto=ddd severity=1 period=""
</item>

<!– 80 Col Marker ######################################################## –>

<item command=“get”> Get Commands

app
host
host group
host group id
item
user
trigger
 </item>

<!– 80 Col Marker ######################################################## –>

<item command="get_user">

Get User syntax: get user show=headers limit=n

</item>

<!– 80 Col Marker ######################################################## –>

<item command="get_item">

Get Item syntax: get item show=headers limit=n

Returns a list of items based on the parameters given
hostids      - A list or single host to return items for, if a list is given
               it must be encased in [], example:
               get item hostids=[1,2]
show         - a list of headers encased in [] or "all" to show all headers
limit        - how many items to show before stopping
               The default limit is 100
 </item>

<!– 80 Col Marker ######################################################## –>

<item command="delete_user">

Delete User syntax: delete user id=num

id must be a number
</item>

<!– 80 Col Marker ######################################################## –>

<item command="delete_item">

Delete Item syntax: delete item itemid=num

itemid must be a number
</item>

<!– 80 Col Marker ######################################################## –>

<item command="import">

import syntax: import &lt;filename&gt;

Import an XML file into Zabbix. Requires one file name to be passed. An error will be returned for 0 or 2+ arguments passed.

</item>

<!– 80 Col Marker ######################################################## –>

<item command="raw_api">

raw api syntax: raw api method parameter=value parameter=value

The following example will mimic the get user call: +> raw api user.get extendoutput=true limit=100

</item>

<!– 80 Col Marker ######################################################## –>

<item command="raw_api">

raw json syntax: raw json {json call}

The following example will mimic the get user call: +> raw json {“auth”:“$auth”,“method”:“user.get”,“id”:2,“params”:{“extendoutput”:true,“limit”:100},“jsonrpc”:“2.0”}

note:

The automatically updated variable $auth was used.  You can choose to use
this variable or you can use a different one, however the $auth variable
is the one provided by the server upon login.
</item>

</help>

</zabcon_help>