What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

monitor a tomcat app

Votes:

0

What sensor should I use to monitor a tomcat app and a blocked or when I return a specific error, you can restart the webapp.

http-sensor prtg tomcat

Created on Apr 28, 2013 4:33:40 PM



9 Replies

Votes:

0

Hi,
there is no native sensor to monitor tomcat apps. When you are using the server status plug in you might use the Apache Server Status sensors (Totals or PerfStats) to monitor the overall status. Evertyhing else would have to be done via custom script and the SSH Script Sensors (normal or advanced).
Best regards

Created on Apr 29, 2013 11:35:45 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

Hi, Currently I have set the sensor httptransactionsensor to detect a GET of the page to see if this up or down. Can not restart if it detects this? you have examples of scripts? Best regards

Created on May 2, 2013 7:35:46 AM



Votes:

0

You would be able to create a notification that can either perform an HTTP action through a notification that can be triggered by an state change for that sensor.

For rebooting that server, it would depend on what kind of OS the tomcat is running on. You could write a batch to restart the service or something like that but it's hard to say without knowing more details about the Tomcat server.

Notifications

Created on May 2, 2013 2:25:24 PM by  Greg Campion [Paessler Support]



Votes:

0

Hi, This is a Tomcat on Windows.

The notification email reaches me that the service is down, but as I can run a cmd when you get that notification to restart Tomcat?

Thanks

Created on May 2, 2013 2:36:46 PM



Votes:

0

Yes, you can set up multiple notifications for when a sensor goes down and for a service like that, you could set up a notification to run small batch script that would restart that service when the GET command was successful or not.

The batch file would include something like

net startservice

net stopservice

See the section about executing a program towards the bottom of this article

Notifications

Created on May 2, 2013 3:40:23 PM by  Greg Campion [Paessler Support]



Votes:

0

Hi,

I've checked the notification section, worst not how or where to set the execution of a CMD

Regards

Created on May 2, 2013 3:42:06 PM



Votes:

0

In the Notifications section of the software under the Setup tab, you can create or change the notifications that are set up in your system. Within the page where you can set up or edit a notification, at the bottom there is a checkbox that says Execute Program. If you click that checkbox you will be able to select which program you want to run. There you can choose from *.exe, *.bat, *.cmd, *.com or *.ps1 files located in the Notifications/exe subfolder of your PRTG installation.

Created on May 2, 2013 7:37:42 PM by  Greg Campion [Paessler Support]



Votes:

0

Hi,

But I have to create a notification for each program you want to run on a sensor?

Thanks

Created on May 2, 2013 8:06:12 PM



Votes:

0

Yes, a notification can only run one program although it may be possible to program a batch script to run multiple programs or do multiple things with one notification.

Created on May 3, 2013 7:28:41 AM by  Greg Campion [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.