Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-23851

Bugs in Template 'HPE iLO by HTTP' main item js code

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • None
    • None

      Hello,

      'Get Data' item code have bugs:

      In apiLogout function lines should be changed ( changed line starts with comment)

      1. from:

      url = encodeURI(ilo.session_url);
      

      to:

      url = encodeURI(ilo.params.ilo_url.replace(/\/$/, "") + ilo.session_url);
      

      2. from:

      if (request.getStatus() != 200) {
      

      to:

      if (request.getStatus() != 204) {
      

      Without these changes apiLogout function always will throw error, especially 1st change. Regarding 2nd it may depend on actuall HP system - better to include all 20* return codes.

      Even worse - after several times of usage as sessions will not be deleted it can hit maximum number of connections https://developer.hpe.com/blog/managing-ilo-sessions-with-redfish/

      Next just suggestions;

      ilo.params.ilo_url should be stored without trailing '/' and relative urls used with starting '/' ,  as every redfish documentation urls shows this way and ilo.session_url is returned with starting '/'.

       

       

            zalex_ua Oleksii Zagorskyi
            Audrius Audrius Sadlauskas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: