Hi
I have a list of about 20 banned words that setup in a web filter and work fine. What I want to do is to create a report on all those banned words to see who searched for them. I have the following dataset that allows me to search for one banned word/s. Is there a way to get it to read a list of words say inside a for loop?
Thanks for any help
Ian
select from_itime(itime) as timestamp, keyword, srcip, coalesce( nullifna(`user`), ipstr(`srcip`) ) as user_src, count(*) as requests from $log where $filter and lower(keyword) like '%example words%' group by keyword, timestamp, srcip, user_src order by timestamp
Web: www.activatelearning.ac.uk
Twitter: twitter.com/activate_learn
Facebook: facebook.com/Activate-Learning
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hi Ian,
It is not recommend that user define their own functions in our DB, please put them in one query. You query looks good, but if you want to see count(*), you do not need timestamp. The query should be like:
select keyword, srcip, coalesce(nullifna(`user`), ipstr(`srcip`)) as user_src, count(*) as requests from $log where $filter and lower(keyword) in ('keyword1', 'keyword2'......) group by keyword, srcip, user_src order by requests desc
If you need wildcard, use: lower(keyword) similar to '%(keyword1|keyword2|...|keyword20)%'
regards,
hz
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1721 | |
1098 | |
752 | |
447 | |
234 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.