[ZBX-9274] Some unification for agent doc and agent help Created: 2015 Feb 02  Updated: 2017 May 30  Resolved: 2015 Sep 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Documentation (D)
Affects Version/s: 2.4.3
Fix Version/s: 3.0.0alpha3

Type: Incident report Priority: Trivial
Reporter: Oleksii Zagorskyi Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: consistency, path
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File zabbix_agentd-r55681.exe     File zabbix_agentd-r55684.exe    
Issue Links:
Duplicate

 Description   

Some data is below, what suggested to be changed - is described below in sub issues:
2.4 on windows

c:\Program Files\Zabbix Agent>zabbix_agentd.exe --help
Zabbix Agent Win32 (service) v2.4.3 (revision 51166) (15 December 2014)

usage: zabbix_agentd.exe [-Vhp] [-idsx] [-m] [-c <config-file>] [-t <item key>]

Options:
  -c --config <config-file>       Absolute path to the configuration file
  -p --print                      Print known items and exit
  -t --test <item key>            Test specified item and exit
  -h --help                       Display help information
  -V --version                    Display version number

Functions:

  -i --install          Install Zabbix agent as service
  -d --uninstall        Uninstall Zabbix agent from service
  -s --start            Start Zabbix agent service
  -x --stop             Stop Zabbix agent service
  -m --multiple-agents  Service name will include hostname

c:\Program Files\Zabbix Agent>zabbix_agentd.exe -V
Zabbix Agent Win32 (service) v2.4.3 (revision 51166) (15 December 2014)
Compilation time: Dec 15 2014 16:26:59

2.4:

# ./zabbix_agentd --help
Zabbix Agent (daemon) v2.4.3 (revision 51175) (15 December 2014)

usage: zabbix_agentd [-Vhp] [-R <runtime option>] [-c <config-file>] [-t <item key>]

Options:
  -c --config <config-file>       Absolute path to the configuration file
  -p --print                      Print known items and exit
  -t --test <item key>            Test specified item and exit
  -h --help                       Display help information
  -V --version                    Display version number
  -R --runtime-control <option>   Perform administrative functions

Runtime control options:
  log_level_increase=<target>     Increase log level, affect all processes if target is not specified
  log_level_decrease=<target>     Decrease log level, affect all processes if target is not specified

Log level control targets:
  <pid>                           Process identifier
  <process type>                  All processes of specified type (e.g., listener)
  <process type,N>                Process type and number (e.g., listener,3)



# ./zabbix_agentd -V
Zabbix Agent (daemon) v2.4.3 (revision 51175) (15 December 2014)
Compilation time: Jan 25 2015 13:29:14

trunk (2.5):

# ./zabbix_agentdtrunk --help
usage:
       zabbix_agentdtrunk [-c config-file]
       zabbix_agentdtrunk [-c config-file] -p
       zabbix_agentdtrunk [-c config-file] -t item-key
       zabbix_agentdtrunk [-c config-file] -R runtime-option
       zabbix_agentdtrunk -h
       zabbix_agentdtrunk -V

A Zabbix daemon for monitoring of various server parameters.

Options:
  -c --config config-file               Absolute path to the configuration file
  -p --print                            Print known items and exit
  -t --test item-key                    Test specified item and exit
  -R --runtime-control runtime-option   Perform administrative functions

    Runtime control options:
      log_level_increase=target         Increase log level, affects all processes if target is not specified
      log_level_decrease=target         Decrease log level, affects all processes if target is not specified

      Log level control targets:
        pid                             Process identifier
        process-type                    All processes of specified type (e.g., listener)
        process-type,N                  Process type and number (e.g., listener,3)

  -h --help                             Display this help message
  -V --version                          Display version number

Example: zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf

Report bugs to: <https://support.zabbix.com>
Zabbix home page: <http://www.zabbix.com>
Documentation: <https://www.zabbix.com/documentation>



./zabbix_agentdtrunk -V
zabbix_agentd (daemon) (Zabbix) 2.5.0
Revision 51809 11 September 2014, compilation time: Jan 24 2015 01:20:39

Copyright (C) 2015 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to the license.
There is NO WARRANTY, to the extent permitted by law.

part of man page, trunk (2.5):

ZABBIX_AGENTD(8)                                                   System Manager's Manual                                                  ZABBIX_AGENTD(8)

NAME
       zabbix_agentd - Zabbix agent daemon

SYNOPSIS
       zabbix_agentd [-c config-file]
       zabbix_agentd [-c config-file] -p
       zabbix_agentd [-c config-file] -t item-key
       zabbix_agentd [-c config-file] -R runtime-option
       zabbix_agentd -h
       zabbix_agentd -V

DESCRIPTION
       zabbix_agentd is a daemon for monitoring of various server parameters.

OPTIONS
       -c, --config config-file
              Use the alternate config-file instead of the default one.  Absolute path should be specified.

       -R, --runtime-control runtime-option
              Perform administrative functions according to runtime-option.

           Runtime control options
               log_level_increase[=target]
                   Increase log level, affects all processes if target is not specified

               log_level_decrease[=target]
                   Decrease log level, affects all processes if target is not specified

           Log level control targets
               pid Process identifier

               process-type
                   All processes of specified type (e.g., listener)

               process-type,N
                   Process type and number (e.g., listener,3)

       -p, --print


 Comments   
Comment by Oleksii Zagorskyi [ 2015 Feb 02 ]

(1)
In the same time in documentation we say:

-c --config <file> specify configuration file, default is /etc/zabbix/zabbix_agentd.conf

https://www.zabbix.com/documentation/2.4/manual/concepts/agent

Note that ", default is /etc/zabbix/zabbix_agentd.conf" part is not correct since 2.0 and should be removed from documentation as default depends on --prefix configure option.
Optionally we may leave it, but then the path has to be changed to, for example, "default depends on --sysconfdir or --prefix options during compilation"

martins-v RESOLVED. Default paths mentioned for both UNIX and Windows in comments for the -c option in https://www.zabbix.com/documentation/2.4/manual/concepts/agent#running_agent_processes

zalex_ua I like it, CLOSED.

Comment by Oleksii Zagorskyi [ 2015 Feb 02 ]

(2) [agent]
To unify documentation and --help for agent I'd suggest to add info about default paths to the --help.

Should we do it of windows agent only?
Or maybe for unix as well?
For unix --help could provide exact and correct default path to the config file.

<dimir> Added default path for Windows and other platforms. RESOLVED in r55658.

zalex_ua tested agents for windows and linux. In short: I'm just happy
Details on linux - it depends on compilation (configuration) options, as it should!
I believe it would worth to reflect on whats_new_3.0 page.
Examples:

with --prefix=/usr:
  -c --config config-file               Absolute path to the configuration file
                                        (default: "/etc/zabbix/zabbix_agentd.conf")

default configure:
  -c --config config-file               Absolute path to the configuration file
                                        (default: "/usr/local/etc/zabbix_agentd.conf")

on windows:
  -c --config config-file               Absolute path to the configuration file
                                        (default: "C:\zabbix_agentd.conf")

<dimir> Not quite, when used with --prefix=/usr the default will be "/usr/etc/zabbix_agentd.conf".

zalex_ua ahh, you are right !

Correct examples:

with --sysconfdir=/etc/zabbix:
  -c --config config-file               Absolute path to the configuration file
                                        (default: "/etc/zabbix/zabbix_agentd.conf")

default configure:
  -c --config config-file               Absolute path to the configuration file
                                        (default: "/usr/local/etc/zabbix_agentd.conf")

on windows:
  -c --config config-file               Absolute path to the configuration file
                                        (default: "C:\zabbix_agentd.conf")

sasha CLOSED

Comment by Oleksii Zagorskyi [ 2015 Feb 02 ]

(3)
add note to documentation that -p and -t options for zabbix_agentd invocation will return results for userparameters only if config file is specified (in case if config file is not located on default path)
It will not be redundant, IMO.

That's why I asked to pay attention for default paths in (1) and (2)

martins-v RESOLVED. See https://www.zabbix.com/documentation/2.4/manual/concepts/agent#running_agent_processes (the note is added with descriptions of -p and -t)

zalex_ua I like it, CLOSED.

Comment by Oleksii Zagorskyi [ 2015 Feb 02 ]

(4)
On the doc page https://www.zabbix.com/documentation/2.4/manual/concepts/agent general command line option like -h -V -p -t repeated in two places - for unix and windows agent sections.

I feel that it complicates understanding which options supported for unix and windows.
So I'd suggest to leave description -h -V -p -t top of the page and add (3) below of them
Then add(format) separate sections for specific (or different - (2)) options for unix and windows.

martins-v RESOLVED. See https://www.zabbix.com/documentation/2.4/manual/concepts/agent#running_agent_processes (options are in one table now, for both UNIX and Windows)

zalex_ua After improved headers alignment - CLOSED.

Comment by Oleksii Zagorskyi [ 2015 Feb 02 ]

(5) [documentation, agent]
it's addition to the (4)

I see recently added "Command line syntax for agent on Microsoft Windows:" section.
I want to ask - why do we mention -p and -t options syntax for windows agent only ?

in the same time we have dummy examples (unneeded ) for unix agent, but don't have any examples windows.
again, why?

I'd suggest to remove the section and examples and bottom of the page add section like "Syntax in specific cases" add where something like this:


zabbix_agentd.exe -i -  install "Zabbix Agent" service for windows using default path to config file c:\zabbix_agentd.conf
zabbix_agentd.exe  -i -m -c zabbix_agentd.conf-  install "Zabbix Agent [Hostname]" service for windows using config file zabbix_agentd.conf located in the same folder as agent  executable and make the service name unique by extending it by Hostname value from the config file.
shell> zabbix_agentd -p - print all build-in keys with values
shell> zabbix_agentd -t "mysql.ping" -c /etc/zabbix/zabbix_agentd.conf - test a user parameter with "mysql.ping" key defined in the specified config file
etc

Note that in any case the -m option of windows agent is suggested to be:

  • moved from Functions to Option section
  • and its description replaced by: For -i -d -s -x functions service name will include Hostname value from specified config file

martins-v RESOLVED. I have added the examples after the table, which explains the options.

zalex_ua Documentation looks good.
Next - C coders should resolve it too.

<dimir> Is there something left on the C-side apart from (2)?

zalex_ua yes, it is. Read this subissue please.

<dimir> RESOLVED in r55674

zalex_ua Tested, I like it.

sasha Me too! CLOSED

Comment by dimir [ 2015 Sep 18 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9274.

Windows binary (zabbix_agentd-r55684.exe (x86)) is available in attachment.

Comment by dimir [ 2015 Sep 29 ]

Fixed in pre-3.0.0 (r55832).

Comment by dimir [ 2015 Sep 29 ]

(6) [D] What's new in 3.0

martins-v Reviewed. CLOSED.

Generated at Sat Apr 27 05:10:52 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.