All Apps and Add-ons

Get logs of application running on localhost

KavinVicky
Loves-to-Learn

I have an instance of java application running on my local machine under the URL: http://localhost:8080.

Since its local instance, the java application can be seen running in the CMD, and if I perform some functionality(ex. download a file), I can see the live logs in the CMD(ex. Starting download of file... Download Completed...).

I want to know if Splunk can monitor this localhost URL, and I see these live logs in the splunk enterprise application(Or website monitoring app).

I have tried website monitoring app, but splunk returns a 404 for localhost.

Kindly help on this issue.

Labels (1)
0 Karma

KavinVicky
Loves-to-Learn

Thank you for your reply @somesoni2. Highly appreciated.

I am currently using website monitoring to monitor the mentioned localhost URL.

These are my questions. Today is my first day with Splunk, so bear with me if I am repeating.

1. Does website monitoring app have capability to monitor the localhost at all(by using any other add-ons/collectors) and get these logs to its interface.

Also if I provide some URL like https://www.youtube.com, in the website monitoring app, its returning a 200 status code. But localhost:8080 where my application is running, returns 404 or 405. Can you please clarify.

2. Does website monitoring app just check the availability of the web application or does it even get the logs(which I mentioned above, like starting download... etc..)

0 Karma

somesoni2
Revered Legend

I've not personally worked with this app so I won't be able to help you much with this.

https://github.com/LukeMurphey/splunk-website-monitoring

Based on app's README, it's useful for monitoring web applications for downtime and slow response times, this may not be the app you need.

Regarding 404 error, is the website monitoring app deployed on same host where your web application is running?

0 Karma

KavinVicky
Loves-to-Learn

Yes @somesoni2. deployed on same host but different port.. splunk is on 8000 and my app on 8080..

0 Karma

somesoni2
Revered Legend

I don't believe Splunk would be able to read your application's STDOUT/STDERR logs from background console. If you own the application, change it to log (or redirect) console output to a file which Splunk can read OR use Splunk SDK to send logs directly to Splunk.

0 Karma

KavinVicky
Loves-to-Learn

Also if I provide some URL like https://www.youtube.com, in the website monitoring app, its returning a 200 status code. But localhost:8080 where my application is running, returns 404 or 405. Can you please clarify.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...