Alerting

How to create an alert that monitors ports 8000, 8089 and 9997 every 5 mins

rrettig
New Member

Hello Folks!

I need to create an alert that that checks if ports 800, 8089 and 9997 are up or down every 5 minutes. Could you please help me out? TIA!

0 Karma

rrettig
New Member

This is what we have right now.

| rest splunk_server=local /services/search/distributed/peers/
| where status="Up" AND disabled=0
| fields peerName, status
| rename peerName as Instance, status as Status

0 Karma

adonio
Ultra Champion

millions of ways to it ...
here is one from top of my head, in linux, create a scripted input that does something like that;
sudo lsof -i -P -n | grep LISTEN <ports numbers ...>
or that
sudo netstat -tulpn | grep LISTEN <ports numbers ...>
in windows same idea ..
netstat -a
take the ouptut to Splunk and search for up or down ...

rrettig
New Member

Is there a way to run a search through Splunk?

0 Karma

adonio
Ultra Champion

yes ... bring the right data, then run your search that captures condition for alert ...

0 Karma

jacobpevans
Motivator

In case it's not clear, you need to apply @adonio 's answer to a scripted input that sends the output to Splunk.

Cheers,
Jacob

If you feel this response answered your question, please do not forget to mark it as such. If it did not, but you do have the answer, feel free to answer your own post and accept that as the answer.
0 Karma

jacobpevans
Motivator

Are you checking a Linux or Windows machine?

Cheers,
Jacob

If you feel this response answered your question, please do not forget to mark it as such. If it did not, but you do have the answer, feel free to answer your own post and accept that as the answer.
0 Karma

rrettig
New Member

Both! We have linux servers and Windows workstations.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...