I'm confused a bit. I use CIM datamodels.
The "tag" field is both a filter for choosing events applicable to a particular datamodel and is an attribute within the datasets.
My datamodel is accelerated.
When I do a simple
| from datamodel:Authentication.Failed_Authentication
I get events with some fields selected (in fast mode) - I assume that those are fields correspoding to the dataset-defined fields.
What's most important for me here is that the "tag" field is populated as with any normal search.
But when I do
| tstats summariesonly=t dc(Authentication.tag) as tag where nodename=Authentication.Failed_Authentication by Authentication.app Authentication.src
I get zero count for dc(Authentication.tag).
It would suggest that the tags are not indexed . All other fields that I tried (like src, dest, user and so on) seem to be indexed OK and I'm able to tstats for them but the tag field is not. Is it treated somehow differently? Or is it because tag is multivalued?
Hi @PickleRick ,
the tag field is mandatory in the scheduled searches to populate Data Models and it's one of the most important fields to define a Data Model, but it isn't a field present by default in Data Models (don't ask me why!).
For this reason your search fails.
If you need tag as field of a data Model, you can customize your Data Model adding the tag field, then you can use it.
Hmm... it's interesting. Might that mean that the fields are not getting populated if the app was updated while the acceleration was already on? (I don't know if it was so - it's customer's environment. Just guessing.)
Replying to myself - no, it's not that. I enabled acceleration this morning on my lab system.
The Authentication datamodel does have the tag field (the CIM app version is 4.18.0.
| tstats summariesonly=t dc(Authentication.tag) as tag count from datamodel=Authentication where
Shows 0 tags and 318 count.
Try checking datamodels.conf for tags_whitelist.
According to docs:
* Only the tag fields identified in this allow list (and the event types tagged by them) are loaded when you perform searches with this data model.
They are defined as default in CIM's DMs but maybe you are rewriting it in you local conf?
when searching through accelerated data models with tstats you need to specify FROM.
This should work with your query:
| tstats summariesonly=t dc(Authentication.tag) as tag from datamodel=Authentication where nodename=Authentication.Failed_Authentication by Authentication.app Authentication.src
Naaah. That was my mistake in copy-pasting (didn't want to paste the whole search since it had more fields which were not important at the time). My original SPL did include the "from datamodel=" clause.
But thanks for the heads-up.