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

Google Cloud Platform template fails to create any SQL instances if "instances get" does not get "settings.sqlServerAuditConfig" field

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 7.0.19rc1
    • Templates (T)
    • Zabbix 7.0LTS, any db engine, any web-server
    • Support backlog

      Hello,

      While working with Zabbix 7.0LTS it was discovered that GCP template does not allow to discover entities of SQL instances which have auditlog disabled:
      https://cloud.google.com/sql/docs/sqlserver/db-audit

      javascript preprocessing from template which create an issue (item with key gcp.cloudsql.instances.get):

      	if (obj.db_type.match(/SQLSERVER*/)) {
      		var mssql_audit = getField(sql_inst, 'settings.sqlServerAuditConfig');
      
      		obj.audited = (mssql_audit.bucket) ? true : false;
      	}
      
      

      If for example SQL instance in GCP does not have auditing enabled, and GCP does not return information about it preprocessing would fail with error code:

      Preprocessing failed for: .... 1. Failed: Required field "settings.sqlServerAuditConfig" is not present in data recieved
      

      Removing line of preprocessing mentioned above solves issue, and SQL instance/instances are discovered
      Is it possible to create any sort of filter, or edit javascript to also match entries which does not have "settings.sqlServerAuditConfig" field?

        1. pic1.png
          pic1.png
          18 kB
        2. pic2.png
          pic2.png
          19 kB
        3. pic3.png
          pic3.png
          28 kB
        4. pic4.png
          pic4.png
          47 kB
        5. pic5.png
          pic5.png
          101 kB

            sbelakovs Sergejs Belakovs
            tgrzechulski Tomasz Grzechulski
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h