Splunk Search

How to capture the hits per day on LiveSite/OT servers??

mike000
New Member

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

Tags (2)
0 Karma
1 Solution

manjunathmeti
Champion

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

View solution in original post

0 Karma

manjunathmeti
Champion

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
0 Karma

mike000
New Member

Thanks Manjunath, it works 🙂 Appreciate it.

0 Karma

mike000
New Member

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.

0 Karma

manjunathmeti
Champion

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?

0 Karma

mike000
New Member

Hey Manjunath, yes I did replace the a,c,b, with our livesite servers

0 Karma

richgalloway
SplunkTrust
SplunkTrust

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
---
If this reply helps you, Karma would be appreciated.
0 Karma

mike000
New Member

hey rich, thanks I tried it but it encountered some issue with the timechart. Maybe i messed something up 😛

0 Karma

mike000
New Member

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.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Make sure all servers are using the one sourcetype or add more sourcetypes to your query.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...