sensu / catalog

Monitoring as code for Sensu Go. "There's a template for that!"
8 stars 4 forks source link

[Catalog]: Sumo Logic Integration Handler sumologic-events require command changes #242

Closed aaggarwal-sumo closed 2 years ago

aaggarwal-sumo commented 2 years ago

[Catalog]: Sumo Logic Integration Handler sumologic-events require command changes

Currently When Sumo Logic Integration is installed and Handler is used it is not producing events to Sumo logic Source. On futher investigation it is found that in command --url ${SUMOLOGIC_URL} parameter is missing. On adding parameter events got published to sumologic and logs can be seen.

Expected Behavior

As part of Integration Sumologic-events handler should be corrected

Current Behavior

Parameter missing from Sumologic-events handler from Sumologic Integration

Possible Solution

Add required parameters

Steps to Reproduce (for bugs)

Context

Your Environment

Sensu 6.7.0

aaggarwal-sumo commented 2 years ago

@portertech Let me know if anything else is required

jspaleta commented 2 years ago

This should not be necessary. The sensu-sumologic-handler executable should be able to see the SUMOLOGIC_URL environment variable and use it without it being explicitly given on the commandline. The executable is explicitly designed to allow this to work without having to add it as an argument.

In fact placing a s on the commandline as an option is a security risk, because the another user on the system can see the full commandline using tools like ps and grab the secret value.

jspaleta commented 2 years ago

The actual problem is this: https://github.com/sensu/catalog/blob/16455fc00fb88e050c7c414cdb3f8c6f3d8f22cc/integrations/sumologic/sumologic-analytics/sensu-resources.yaml#L47

There is a spurious comment meant to be a yaml comment that is being treated as part of the handler command, because of the white space indention. This is a weird yaml-ism causing a problem.

And I have potential fix for this waiting for testing and review as part of this PR: https://github.com/sensu/catalog/pull/235

jspaleta commented 2 years ago

This should be fixed in the sumologic/sumologic-analytics/20220504.0.0 version