Hey All,
Back again with another interesting question.
How do we get the number of hits per day for linux/livesite servers.
Example of the query:
(index=cloudfoundry or index=xxx_xxxx) sourcetype=access_xxxx_wcookie(/xx/xxx/content-adpater-webservice) AND (NOT- Pre NOT -Post) AND (status=200) AND (host=n or host= a or host=b or host=t or host=r or host=m)| stats count
Any help is appreciated.
Thanks,
Mike
hi @mike000,
Try this:
(index=cloudfoundry or index=xxx_xxxx) sourcetype=access_xxxx_wcookie(/xx/xxx/content-adpater-webservice) AND (NOT- Pre NOT -Post) AND (status=200) AND (host=n or host= a or host=b or host=t or host=r or host=m) | bin _time span=1d | stats count by _time, host
hi @mike000,
Try this:
(index=cloudfoundry or index=xxx_xxxx) sourcetype=access_xxxx_wcookie(/xx/xxx/content-adpater-webservice) AND (NOT- Pre NOT -Post) AND (status=200) AND (host=n or host= a or host=b or host=t or host=r or host=m) | bin _time span=1d | stats count by _time, host
Thanks Manjunath, it works 🙂 Appreciate it.
Hi Manjunath, I actually have one more question,
Its pulling the hits of the webservers, but its not pulling the hits on the livesite servers when I am changing the servernames in the queries from webserver to livesite server. Any ideas whats going on?
We use them for Content as a Service pull req.
Are livesite servers are part host filed? You added this filter on host field - host=n or host= a or host=b or host=t or host=r or host=m
, does it includes livesite servers?
Hey Manjunath, yes I did replace the a,c,b, with our livesite servers
Perhaps this will help.
(index=cloudfoundry or index=xxx_xxxx) sourcetype=access_xxxx_wcookie(/xx/xxx/content-adpater-webservice) AND (NOT- Pre NOT -Post) AND (status=200) AND (host=n or host= a or host=b or host=t or host=r or host=m)
| timechart span=1d count
hey rich, thanks I tried it but it encountered some issue with the timechart. Maybe i messed something up 😛
I actually have one more question,
Its pulling the hits of the webservers, but its not pulling the hits on the livesite servers when I am changing the servernames in the queries from webserver to livesite server. Any ideas whats going on?
We use them for Content as a Service pull req.
Make sure all servers are using the one sourcetype or add more sourcetypes to your query.