ftsr 发表于 2017-12-31 23:45:48

二次开发:zabbix 进程和命令

# zabbix_get -h  
usage:
  zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address] -k item-key
  zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address]
  --tls-connect cert --tls-ca-file CA-file
[--tls-crl-file CRL-file] [--tls-agent-cert-issuer cert-issuer]
[--tls-agent-cert-subject cert-subject]
  --tls-cert-file cert-file --tls-key-file key-file -k item-key
  zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address]
  --tls-connect psk --tls-psk-identity PSK-identity
  --tls-psk-file PSK-file -k item-key
  zabbix_get -h
  zabbix_get -V
  

  
Get data from Zabbix agent.
  

  
General options:
  -s --host host-name-or-IPSpecify host name or IP address of a host
  -p --port port-number      Specify port number of agent running on the host
  (default: 10050)
  -I --source-address IP-address   Specify source IP address
  

  -k --key item-key          Specify key of the item to retrieve value for
  

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

  
TLS connection options:
  --tls-connect value      How to connect to agent. Values:
  unencrypted - connect without encryption
  (default)
  psk         - connect using TLS and a pre-shared
  key
  cert      - connect using TLS and a
  certificate
  

  --tls-ca-file CA-file      Full pathname of a file containing the top-level
  CA(s) certificates for peer certificate
  verification
  

  --tls-crl-file CRL-file    Full pathname of a file containing revoked
  certificates
  

  --tls-agent-cert-issuer cert-issuer   Allowed agent certificate issuer
  

  --tls-agent-cert-subject cert-subject   Allowed agent certificate subject
  

  --tls-cert-file cert-fileFull pathname of a file containing the certificate
  or certificate chain
  

  --tls-key-file key-file    Full pathname of a file containing the private key
  

  --tls-psk-identity PSK-identity   Unique, case sensitive string used to
  identify the pre-shared key
  

  --tls-psk-file PSK-file    Full pathname of a file containing the pre-shared
  key
  

  
Example(s):
  zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load"
  

  zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load" \
  --tls-connect cert --tls-ca-file /home/zabbix/zabbix_ca_file \
  --tls-agent-cert-issuer \
  "CN=Signing CA,OU=IT operations,O=Example Corp,DC=example,DC=com" \
  --tls-agent-cert-subject \
  "CN=server1,OU=IT operations,O=Example Corp,DC=example,DC=com" \
  --tls-cert-file /home/zabbix/zabbix_get.crt \
  --tls-key-file /home/zabbix/zabbix_get.key
  

  zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load" \

  --tls-connect psk --tls-psk-identity "PSK>  --tls-psk-file /home/zabbix/zabbix_agentd.psk
  

  
Report bugs to: <https://support.zabbix.com>
  
Zabbix home page: <http://www.zabbix.com>
  
Documentation: <https://www.zabbix.com/documentation>
  
# zabbix_get -h
  
usage:
  zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address] -k item-key
  zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address]
  --tls-connect cert --tls-ca-file CA-file
[--tls-crl-file CRL-file] [--tls-agent-cert-issuer cert-issuer]
[--tls-agent-cert-subject cert-subject]
  --tls-cert-file cert-file --tls-key-file key-file -k item-key
  zabbix_get -s host-name-or-IP [-p port-number] [-I IP-address]
  --tls-connect psk --tls-psk-identity PSK-identity
  --tls-psk-file PSK-file -k item-key
  zabbix_get -h
  zabbix_get -V
  

  
Get data from Zabbix agent.
  

  
General options:
  -s --host host-name-or-IPSpecify host name or IP address of a host
  -p --port port-number      Specify port number of agent running on the host
  (default: 10050)
  -I --source-address IP-address   Specify source IP address
  

  -k --key item-key          Specify key of the item to retrieve value for
  

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

  
TLS connection options:
  --tls-connect value      How to connect to agent. Values:
  unencrypted - connect without encryption
  (default)
  psk         - connect using TLS and a pre-shared
  key
  cert      - connect using TLS and a
  certificate
  

  --tls-ca-file CA-file      Full pathname of a file containing the top-level
  CA(s) certificates for peer certificate
  verification
  

  --tls-crl-file CRL-file    Full pathname of a file containing revoked
  certificates
  

  --tls-agent-cert-issuer cert-issuer   Allowed agent certificate issuer
  

  --tls-agent-cert-subject cert-subject   Allowed agent certificate subject
  

  --tls-cert-file cert-fileFull pathname of a file containing the certificate
  or certificate chain
  

  --tls-key-file key-file    Full pathname of a file containing the private key
  

  --tls-psk-identity PSK-identity   Unique, case sensitive string used to
  identify the pre-shared key
  

  --tls-psk-file PSK-file    Full pathname of a file containing the pre-shared
  key
  

  
Example(s):
  zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load"
  

  zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load" \
  --tls-connect cert --tls-ca-file /home/zabbix/zabbix_ca_file \
  --tls-agent-cert-issuer \
  "CN=Signing CA,OU=IT operations,O=Example Corp,DC=example,DC=com" \
  --tls-agent-cert-subject \
  "CN=server1,OU=IT operations,O=Example Corp,DC=example,DC=com" \
  --tls-cert-file /home/zabbix/zabbix_get.crt \
  --tls-key-file /home/zabbix/zabbix_get.key
  

  zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load" \

  --tls-connect psk --tls-psk-identity "PSK>  --tls-psk-file /home/zabbix/zabbix_agentd.psk
  

  
Report bugs to: <https://support.zabbix.com>
  
Zabbix home page: <http://www.zabbix.com>
  
Documentation: <https://www.zabbix.com/documentation>
  
页: [1]
查看完整版本: 二次开发:zabbix 进程和命令