ZABBIX BUGS AND ISSUES

template.get with select_triggers return none

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.8.7, 1.8.9
  • Fix Version/s: 1.8.11
  • Component/s: API (A)
  • Labels:
  • Zabbix ID:
    Reviewed 2.0

Description

query:
'{"params": {"select_triggers": "extend"}, "jsonrpc": "2.0", "method": "template.get", "auth": "", "id": 1}
return:
{u'hostid': u'100100000010496', u'triggers': [], u'templateid': u'100100000010496'}
{u'hostid': u'100100000010593', u'triggers': [None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None], u'templateid': u'100100000010593'}
count of "none" coincide with number of triggers on that template

Activity

Hide
gescheit added a comment - - edited

fixed by this patch

Show
gescheit added a comment - - edited fixed by this patch
Hide
Igor Danoshaites added a comment -

Hi,

Can reproduce the similar problem in the latest v1.8.9 when using "template.get" method with the following parameters: {"select_triggers":"extend","output":"extend","host":"H1"}, but in the output I am getting "null" values:

{"hostid":"100100000010004","proxy_hostid":"0","host":"Template_Standalone","dns":"","useip":"0","ip":"","port":"10050","status":"3","disable_until":"0","error":"","available":"0","errors_from":"0","lastaccess":"0","inbytes":"0","outbytes":"0","useipmi":"0","ipmi_port":"623","ipmi_authtype":"0","ipmi_privilege":"2","ipmi_username":"","ipmi_password":"","ipmi_disable_until":"0","ipmi_available":"0","snmp_disable_until":"0","snmp_available":"0","maintenanceid":"0","maintenance_status":"0","maintenance_type":"0","maintenance_from":"0","ipmi_ip":"","ipmi_errors_from":"0","snmp_errors_from":"0","ipmi_error":"","snmp_error":"","templateid":"100100000010004","triggers":[null,null,null,null,null,null,null]}

The same "null" output when using "select_graphs" and "select_applications" parameters.

Show
Igor Danoshaites added a comment - Hi, Can reproduce the similar problem in the latest v1.8.9 when using "template.get" method with the following parameters: {"select_triggers":"extend","output":"extend","host":"H1"}, but in the output I am getting "null" values: {"hostid":"100100000010004","proxy_hostid":"0","host":"Template_Standalone","dns":"","useip":"0","ip":"","port":"10050","status":"3","disable_until":"0","error":"","available":"0","errors_from":"0","lastaccess":"0","inbytes":"0","outbytes":"0","useipmi":"0","ipmi_port":"623","ipmi_authtype":"0","ipmi_privilege":"2","ipmi_username":"","ipmi_password":"","ipmi_disable_until":"0","ipmi_available":"0","snmp_disable_until":"0","snmp_available":"0","maintenanceid":"0","maintenance_status":"0","maintenance_type":"0","maintenance_from":"0","ipmi_ip":"","ipmi_errors_from":"0","snmp_errors_from":"0","ipmi_error":"","snmp_error":"","templateid":"100100000010004","triggers":[null,null,null,null,null,null,null]} The same "null" output when using "select_graphs" and "select_applications" parameters.
Hide
gescheit added a comment -

also fixed graphs and applications

Show
gescheit added a comment - also fixed graphs and applications
Hide
gescheit added a comment -

1.8.10 - still not fixed.

Show
gescheit added a comment - 1.8.10 - still not fixed.
Hide
Alexei Vladishev added a comment - - edited

Resolved in development branch svn://svn.zabbix.com/branches/dev/ZBX-4124. Ready to test.

A quick note, the code now is made in sync with host.get. I made also one formatting fix to make it absolutely similar to host.get.

Show
Alexei Vladishev added a comment - - edited Resolved in development branch svn://svn.zabbix.com/branches/dev/ZBX-4124. Ready to test. A quick note, the code now is made in sync with host.get. I made also one formatting fix to make it absolutely similar to host.get.
Hide
Pavels Jelisejevs added a comment - - edited

(1) The "select_macros" option doesn't work with API_OUTPUT_REFER.

<alexei> discussed with Sasha. Code of usermacro.get is broken, it should be fixed under ZBX-4719 in trunk, no fix will be available for 1.8.x.

<pavels> ok, CLOSED then.

Show
Pavels Jelisejevs added a comment - - edited (1) The "select_macros" option doesn't work with API_OUTPUT_REFER. <alexei> discussed with Sasha. Code of usermacro.get is broken, it should be fixed under ZBX-4719 in trunk, no fix will be available for 1.8.x. <pavels> ok, CLOSED then.
Hide
Pavels Jelisejevs added a comment -

1.8 fix is TESTED.

Show
Pavels Jelisejevs added a comment - 1.8 fix is TESTED.
Hide
Pavels Jelisejevs added a comment -

Fixed for 1.8 in r25895. The trunk doesn't have this problem.

CLOSED.

Show
Pavels Jelisejevs added a comment - Fixed for 1.8 in r25895. The trunk doesn't have this problem. CLOSED.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: