|
117 | 117 | {prog} zabbix item error <host name> |
118 | 118 | {prog} zabbix item lastvalue <host name> |
119 | 119 | {prog} zabbix item lastclock <host name> |
| 120 | + |
| 121 | +Export metrics to zabbix server |
| 122 | +Command: --send-data-zabbix |
| 123 | +Example: |
| 124 | + {prog} --send-data-zabbix --zabbix-file=localhost.log --zabbix-addres=licalhost |
| 125 | +Options: |
| 126 | + --zabbix-address <name of the Zabbix host to send metrics> |
| 127 | + --zabbix-port <port of Zabbix server to send metrics> by default 10051 |
| 128 | + --zabbix-file <path to file with metrics to send metrics> |
| 129 | + --zabbix-client <name of the Zabbix host to send metrics> by default localhost |
| 130 | + --zabbix-log-level <log level to send metrics> (INFO|DEBUG|WARN) by default INFO |
120 | 131 | """ |
121 | 132 |
|
122 | 133 | if platform.LINUX: |
@@ -261,4 +272,15 @@ def parse_args(): |
261 | 272 | parser.add_option( |
262 | 273 | '--application', dest='application', |
263 | 274 | default='App-PostgresPro-{0}'.format(sys.platform.title())) |
| 275 | + # Zabbix server to send metrics |
| 276 | + parser.add_option('--zabbix-address', dest='zabbix_address', default=None) |
| 277 | + # port of Zabbix server to send metrics |
| 278 | + parser.add_option('--zabbix-port', dest='zabbix_port', default='10051') |
| 279 | + # name of the Zabbix host to send metrics |
| 280 | + parser.add_option('--zabbix-client', dest='zabbix_client', default='localhost') |
| 281 | + # path to file with metrics to send metrics |
| 282 | + parser.add_option('--zabbix-file', dest='zabbix_file', default=None) |
| 283 | + # log level to send metrics |
| 284 | + parser.add_option('--zabbix-log-level', dest='zabbix_log_level', default='INFO') |
| 285 | + |
264 | 286 | return parser.parse_args() |
0 commit comments