Getting Data In

Unix server Apache instences monitering

marellasunil
Communicator

How to moniter apache instance of a Unix server in splunk.
There are 10 apache instances running every time in Unix server. and my idea is to check whether it is up or down through Splunk.
Can anybody suggest me.
I have a code to run manullay in Server as well
Name : apache_serv
If I run "apache_serv resident all", it list down all the apache instances.

Tags (1)
0 Karma
1 Solution

bmacias84
Champion

Hello,
I am not sure how familiar you are will script inputs or what your deployment process. This is my thought is to create a script input. I assume that apache_serv is a perl, bash, python or some kind of script. If so I would create a .sh file to be ran using splunk script input method. Splunk will then read the output from your command.

Going a little further I would create a Technology Add-on (TA) and deploy it via the Deployment Server.

myApacheInstances.sh


#!/bin/bash
/bin/<script_location>/ apache_serv resident all
done

If I created a TA this call apache_default

Outputs.conf


[script://$SPLUNK_HOME/apache_default/bin/myApacheInstance.sh]
index = <myIndex>
source = myApacheInstances.sh
sourcetype = <mySourceType>
#My interval for collection
interval = 0 0 * * *

Additional Reading:

Setupcustominputs

CreatingaTechnologyAdd-on

Hope this helps or gets you started. Dont forget to thumbs up and/or accept answers.

Cheers

View solution in original post

0 Karma

bmacias84
Champion

Hello,
I am not sure how familiar you are will script inputs or what your deployment process. This is my thought is to create a script input. I assume that apache_serv is a perl, bash, python or some kind of script. If so I would create a .sh file to be ran using splunk script input method. Splunk will then read the output from your command.

Going a little further I would create a Technology Add-on (TA) and deploy it via the Deployment Server.

myApacheInstances.sh


#!/bin/bash
/bin/<script_location>/ apache_serv resident all
done

If I created a TA this call apache_default

Outputs.conf


[script://$SPLUNK_HOME/apache_default/bin/myApacheInstance.sh]
index = <myIndex>
source = myApacheInstances.sh
sourcetype = <mySourceType>
#My interval for collection
interval = 0 0 * * *

Additional Reading:

Setupcustominputs

CreatingaTechnologyAdd-on

Hope this helps or gets you started. Dont forget to thumbs up and/or accept answers.

Cheers

0 Karma
Get Updates on the Splunk Community!

Index This | What are the 12 Days of Splunk-mas?

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

Get Inspired! We’ve Got Validation that Your Hard Work is Paying Off

We love our Splunk Community and want you to feel inspired by all your hard work! Eric Fusilero, our VP of ...

What's New in Splunk Enterprise 9.4: Features to Power Your Digital Resilience

Hey Splunky People! We are excited to share the latest updates in Splunk Enterprise 9.4. In this release we ...