Skip to content

Conversation

@janvi-elastic
Copy link
Contributor

@janvi-elastic janvi-elastic commented Jul 22, 2025

Proposed commit message

The initial release includes asset data stream, associated dashboards 
and visualizations.

Qualys GAV fields are mapped to their corresponding ECS fields where possible.

Test samples were derived from documentation and live data samples, 
which were subsequently sanitized.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

  • Clone integrations repo.
  • Install elastic package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/qualys_gav directory.
  • Run the following command to run tests.

elastic-package test

--- Test results for package: qualys_gav - START ---
╭────────────┬─────────────┬───────────┬─────────────────────────────────────────────────────────────────────┬────────┬──────────────╮
│ PACKAGE    │ DATA STREAM │ TEST TYPE │ TEST NAME                                                           │ RESULT │ TIME ELAPSED │
├────────────┼─────────────┼───────────┼─────────────────────────────────────────────────────────────────────┼────────┼──────────────┤
│ qualys_gav │             │ asset     │ dashboard qualys_gav-e7e0529f-6cb1-4b01-b5f8-568cfb07c306 is loaded │ PASS   │       1.63µs │
│ qualys_gav │ asset       │ asset     │ index_template logs-qualys_gav.asset is loaded                      │ PASS   │        257ns │
│ qualys_gav │ asset       │ asset     │ ingest_pipeline logs-qualys_gav.asset-0.1.0 is loaded               │ PASS   │        189ns │
╰────────────┴─────────────┴───────────┴─────────────────────────────────────────────────────────────────────┴────────┴──────────────╯
--- Test results for package: qualys_gav - END   ---
Done
--- Test results for package: qualys_gav - START ---
╭────────────┬─────────────┬───────────┬───────────────────────────────────────────┬────────┬──────────────╮
│ PACKAGE    │ DATA STREAM │ TEST TYPE │ TEST NAME                                 │ RESULT │ TIME ELAPSED │
├────────────┼─────────────┼───────────┼───────────────────────────────────────────┼────────┼──────────────┤
│ qualys_gav │ asset       │ pipeline  │ (ingest pipeline warnings test-asset.log) │ PASS   │ 346.797409ms │
│ qualys_gav │ asset       │ pipeline  │ test-asset.log                            │ PASS   │ 434.950727ms │
╰────────────┴─────────────┴───────────┴───────────────────────────────────────────┴────────┴──────────────╯
--- Test results for package: qualys_gav - END   ---
Done
--- Test results for package: qualys_gav - START ---
╭────────────┬─────────────┬───────────┬──────────────────────────┬────────┬──────────────╮
│ PACKAGE    │ DATA STREAM │ TEST TYPE │ TEST NAME                │ RESULT │ TIME ELAPSED │
├────────────┼─────────────┼───────────┼──────────────────────────┼────────┼──────────────┤
│ qualys_gav │ asset       │ static    │ Verify sample_event.json │ PASS   │ 170.773573ms │
╰────────────┴─────────────┴───────────┴──────────────────────────┴────────┴──────────────╯
--- Test results for package: qualys_gav - END   ---
Done
--- Test results for package: qualys_gav - START ---
╭────────────┬─────────────┬───────────┬───────────┬────────┬───────────────╮
│ PACKAGE    │ DATA STREAM │ TEST TYPE │ TEST NAME │ RESULT │  TIME ELAPSED │
├────────────┼─────────────┼───────────┼───────────┼────────┼───────────────┤
│ qualys_gav │ asset       │ system    │ default   │ PASS   │ 46.423833195s │
╰────────────┴─────────────┴───────────┴───────────┴────────┴───────────────╯
--- Test results for package: qualys_gav - END   ---
Done

Related issues

Screenshot

image (1) image

@janvi-elastic janvi-elastic requested a review from a team as a code owner July 22, 2025 13:25
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@andrewkroh andrewkroh added Crest Contributions from Crest developement team. New Integration Issue or pull request for creating a new integration package. dashboard Relates to a Kibana dashboard bug, enhancement, or modification. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:qualys_gav Qualys Global AssetView labels Jul 22, 2025
@janvi-elastic
Copy link
Contributor Author

@ShourieG - As discussed, I have created an issue in the Elasticsearch repository to request the necessary index deletion permissions using ILM policy.

@ShourieG ShourieG requested a review from a team July 25, 2025 09:45
@janvi-elastic janvi-elastic requested a review from ShourieG July 29, 2025 06:18
Comment on lines +265 to +271
"lastVMScan": 0,
"lastComplianceScan": 0,
"lastFullScan": 0,
"lastVmScanDateScanner": 0,
"lastVmScanDateAgent": 0,
"lastPcScanDateScanner": 0,
"lastPcScanDateAgent": 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are likely not epoch(0) (1970-01-01T00:00:00.000Z), but rather absent data, so the date processors should probably test for 0 and not retain as a timestamp if they are. Do qualys document this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we do not have Documentation For Fields by Qualys GAV, although we agree with your point that 0 indicated the absence of data.
So should we process to remove the field?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please.

Comment on lines 706 to 721
// Parse times into long
long lastBootMillis = parseTime(lastBootStr);
long createdDateMillis = parseTime(createdDateStr);

// Early exit
if(lastBootMillis < createdDateMillis) {
return;
}

// Calculate uptime
long uptimeMillis = lastBootMillis - createdDateMillis;
long uptimeSeconds = uptimeMillis / 1000;

// Set uptime
ctx.host = ctx.host ?: [:];
ctx.host.uptime = uptimeSeconds;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused by all of this.

  • what is the meaning of the created_date field?
  • what relationship does the creation date have with the uptime? surely uptime is now - last_boot_time?
  • what is the meaning of the invariant assertion with the // Early exit comment? what does it mean if it fails?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. created_date refers to the creation time of the asset.
  2. We're currently mapping host.uptime as last_boot_time - created_date.
  3. The // Early exit condition handles a corner case where last_boot_time < created_date, which would result in a negative uptime. In such cases, not to set host.uptime.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're currently mapping host.uptime as last_boot_time - created_date.

Why? This does not seem sensible. If I create an asset a year ago, maybe booting it at that time, maybe not, and then shut it down until today. This would give me an uptime of a year. This is obviously not correct.

The // Early exit condition handles a corner case where last_boot_time < created_date, which would result in a negative uptime. In such cases, not to set host.uptime.

This "corner case" is an indication that the invariant is not correctly assumed, as indicated in my insane case above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure we will remove host.uptime mapping.

@janvi-elastic janvi-elastic requested a review from efd6 July 31, 2025 05:13
@ShourieG
Copy link
Contributor

ShourieG commented Aug 8, 2025

@janvi-elastic, I've merged the PR and backported it to 9.1,9.0,8.19.

8.18 is still having some backport failures.

@ShourieG
Copy link
Contributor

ShourieG commented Aug 11, 2025

@janvi-elastic, @efd6, the ILM permissions for kibana_system is now updated in ES for 8.18 and above, so all good from my end on this. We can go ahead with the approval if all else looks good.

@janvi-elastic janvi-elastic requested review from ShourieG and efd6 August 11, 2025 09:08
@janvi-elastic
Copy link
Contributor Author

@janvi-elastic, I've merged the PR and backported it to 9.1,9.0,8.19.

8.18 is still having some backport failures.

So do we need to update the version or we can go ahead with 8.18?

@ShourieG
Copy link
Contributor

@janvi-elastic, I've merged the PR and backported it to 9.1,9.0,8.19.
8.18 is still having some backport failures.

So do we need to update the version or we can go ahead with 8.18?

@janvi-elastic, 8.18 is merged now so no need to update

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Please wait for @ShourieG.

Copy link
Contributor

@ShourieG ShourieG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated review status due to version constraints

@elasticmachine
Copy link

💚 Build Succeeded

History

@elastic-sonarqube
Copy link

@ShourieG ShourieG merged commit ef3b198 into elastic:main Aug 13, 2025
9 checks passed
@elastic-vault-github-plugin-prod

Package qualys_gav - 0.1.0 containing this change is available at https://epr.elastic.co/package/qualys_gav/0.1.0/

robester0403 pushed a commit to robester0403/integrations that referenced this pull request Aug 14, 2025
The initial release includes asset data stream, associated dashboards 
and visualizations.

Qualys GAV fields are mapped to their corresponding ECS fields where possible.

Test samples were derived from documentation and live data samples, 
which were subsequently sanitized.
tehbooom pushed a commit to tehbooom/integrations that referenced this pull request Nov 19, 2025
The initial release includes asset data stream, associated dashboards 
and visualizations.

Qualys GAV fields are mapped to their corresponding ECS fields where possible.

Test samples were derived from documentation and live data samples, 
which were subsequently sanitized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Crest Contributions from Crest developement team. dashboard Relates to a Kibana dashboard bug, enhancement, or modification. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:qualys_gav Qualys Global AssetView New Integration Issue or pull request for creating a new integration package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Integration] Qualys Global AssetView

5 participants