-
Notifications
You must be signed in to change notification settings - Fork 505
METRON-366: Add MODEL_APPLY to Stellar #210
Conversation
|
Testing Instructions Free Up Space on SNVFirst, let's free up some headroom on SNV. If you are running this on a multinode cluster, you would not have to do this.
Install Prerequisites and Mock DGA ServiceNow let's install some prerequisites:
Start Squid via Now that we have flask and jinja, we can create a mock DGA service to deploy with MaaS:
This service will treat Deploy Mock DGA Service via MaaSNow let's start MaaS and deploy the Mock DGA Service:
Adjust Configurations for Squid to Call ModelNow that we have a deployed model, let's adjust the configurations for the Squid topology to annotate the messages with the output of the model.
Start Topologies and Send DataNow we need to start the topologies and send some data:
|
|
Please note that it is non-optimal to only be able to reference models from the beginning (i.e. parsers) and end (i.e. threat triage) of the pipeline. As a follow-on, I'll be adding an enrichment adapter which can be called from the enrichment or threat triage phase and perform arbitrary stellar statement transformations. This should fill in the gap and allow the user to apply their models anywhere in the pipeline. |
|
+1 by inspection. Will try to run it up on full-dev later today or this weekend. Nice job! |
|
Do you have documented anywhere the model classes in A few questions come to mind that some simple javadoc might help with. But one example... A |
| .concurrencyLevel(4) | ||
| .weakKeys() | ||
| .expireAfterWrite(10, TimeUnit.MINUTES) | ||
| .build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we parameterize these settings?
|
happy to add javadoc to that package. To answer your question, Model and ModelEndpoint are different in the sense that Model is a reference to the model. The ModelEndpoint is a reference to where the model is currently being served. You generally search for a Model and are returned a set of ModelEndpoints. If you do not specify a version in the search, you will get ModelEndpoints of multiple versions of the same model. |
| for(ModelEndpoint endpoint : kv.getValue()){ | ||
| System.out.println("\t" + endpoint.getContainerId() + " at " + endpoint.getUrl()); | ||
| System.out.println(endpoint); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a today thing, but do you think this would be better off as a logger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this the LIST operation is intended to output the list of endpoints returned. What I think I will do is make some of the logging debug level because it's getting quite chatty in practice and redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, makes sense to me.
|
+1, worked like a champ! I'm going to run it up one more time with some additional skip tags. Since we're close on memory headroom, it doesn't make sense to me to take time to install a bunch of stuff I'll just have to shut down. If I have any success, I'll put the commands here. I'm also using the new quick-dev image (vagrant box update). |
|
Also successfully tested doing the following:
This dropped the startup time to just over 14 minutes. |
|
14 minutes?! Woah! @dlyle65535 is my hero. |
The preferred method of applying models should be via stellar integration. This should be added as a function and made available as a FieldTransformation and as part of Threat Triage.
This has been run on full-dev. Testing instructions pending...