Skip to content

Commit

Permalink
update collector IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
colelaven authored and dpaasman00 committed Feb 4, 2025
1 parent 4763f63 commit 5bc4658
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion exporter/chronicleexporter/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ const chronicleIngestionLabelsPrefix = `chronicle_ingestion_label`

// Specific collector IDs for Chronicle used to identify bindplane agents.
var (
defaultCollectorID = uuid.MustParse("aaaa1111-aaaa-1111-aaaa-1111aaaa1111")
googleCollectorID = uuid.MustParse("aaaa1111-aaaa-1111-aaaa-1111aaaa1111")
googleEnterpriseCollectorID = uuid.MustParse("aaaa1111-aaaa-1111-aaaa-1111aaaa1112")
enterpriseCollectorID = uuid.MustParse("aaaa1111-aaaa-1111-aaaa-1111aaaa1113")
defaultCollectorID = uuid.MustParse("aaaa1111-aaaa-1111-aaaa-1111aaaa1114")
)

const (
licenseTypeGoogle = "Google"
licenseTypeGoogleEnterprise = "GoogleEnterprise"
licenseTypeEnterprise = "Enterprise"
)
Expand Down Expand Up @@ -592,6 +594,8 @@ func (m *protoMarshaler) buildHTTPRequest(entries []*api.Log) *api.ImportLogsReq

func getCollectorID(licenseType string) []byte {
switch strings.ToLower(licenseType) {
case strings.ToLower(licenseTypeGoogle):
return googleCollectorID[:]
case strings.ToLower(licenseTypeGoogleEnterprise):
return googleEnterpriseCollectorID[:]
case strings.ToLower(licenseTypeEnterprise):
Expand Down
2 changes: 1 addition & 1 deletion exporter/chronicleexporter/marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ func Test_getCollectorID(t *testing.T) {
{
name: "Google",
licenseType: "Google",
expect: defaultCollectorID[:],
expect: googleCollectorID[:],
},
{
name: "FreeCloud",
Expand Down

0 comments on commit 5bc4658

Please sign in to comment.