Created
April 11, 2022 11:18
-
-
Save Che4ter/b1a1236ba9e4eebea2b2c4128d3f67fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Custom.SBB.Label.NewClients | |
description: | | |
This artifact watches for new client enrolments and automatically | |
label the client with the hostname. | |
#server #event #labels | |
type: SERVER_EVENT | |
parameters: | |
sources: | |
- query: | | |
LET info_flow_flows = SELECT * | |
FROM watch_monitoring(artifact="System.Flow.Completion") | |
WHERE Flow.artifacts_with_results =~ "Generic.Client.Info/BasicInformation" | |
LET results = SELECT *, | |
label(client_id=ClientId, labels=Hostname, op="set") | |
FROM source(artifact="Generic.Client.Info/BasicInformation" , | |
client_id=ClientId, flow_id=FlowId) | |
SELECT * FROM foreach(row=info_flow_flows, query=results) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment