Sponsored Content
Full Discussion: Monitor Website
Top Forums Shell Programming and Scripting Monitor Website Post 302929497 by charli1 on Monday 22nd of December 2014 07:04:40 AM
Old 12-22-2014
Monitor Website

Hi all,
i need to do the following,
when i connect to my website it prints out "Welcome User",
but sometimes there are errors like "dictionary not loaded" or "wrong user name or password"
so i wanted to make a script that checks that login page,
and if i get the Welcome massage do nothing,
if i get any other errors/messages i need to restart tomcat
because that is the only solution i have to solve these issues.

#!/bin/sh
url=`www.mywebsite.login.jsp?Username=test&UserPassword=foo`
#check if i get welcome message
if [ $url = Welcome ] ;
then
echo "website is up and running"
else #every thing else printe i need to restart tomcat
/etc/init.d/tomcat restart | echo "$url is down" mail -s 'restarting website' admin@mydomain.com;

fi


Can any body help me on how to configure this script?

Thanks in advance.

Last edited by charli1; 12-23-2014 at 03:54 AM..
 

8 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

website

HELLO FELLOW GEEKS. PLZ CHECK OUT MY FRIENDS SITE AT http://isunshine.dhs.org or u can also join the message board at http://isunshine.dhs.org/scripts/ikonboard.cgi wixifer (1 Reply)
Discussion started by: wixifer
1 Replies

2. UNIX for Dummies Questions & Answers

Website

Hey guys I know you probably get this question a lot but, I want to make a website, and I don't have any experience doing this. I have a iMac and i was wondering if there is someone you could refer me to or a site that will show me how to do it. Thanks. (2 Replies)
Discussion started by: mmecca21
2 Replies

3. Shell Programming and Scripting

Monitor: Read from the monitor

Hello, I would like to write a script that use the display as an input. In the display there is a list of file. I want to use it as an array and this would be the input in my script. Does somebody know how do I make it? (2 Replies)
Discussion started by: mig8
2 Replies

4. Web Development

my website.please. help me.

hello!! well, i am planning to make my own virtual pet site like that of a neopets. unfortunately i don't have any idea on how to do it.. i've tried searching in the net, but the result is really complicated. i don't know where to begin.i have already drawn some that i think would help... (2 Replies)
Discussion started by: ackiemae
2 Replies

5. Shell Programming and Scripting

Website crawler

Hi, I want to build a crawler that seeks for a keyword on certain websites. This is what the website looks like: website.com/xxxxAA11xxxx I want that the crawler automatically changes the letters alphanumerically and if a certain keyword is found, the website got to be logged. But... (12 Replies)
Discussion started by: yaylol
12 Replies

6. Hardware

Fedora 16 dual monitor - dual head - automatic monitor shutdown

Hi, I am experiencing troubles with dual monitors in fedora 16. During boot time both monitors are working, but when system starts one monitor automatically shut down. It happend out of the blue. Some time before when I updated system this happend but then I booted older kernel release and... (0 Replies)
Discussion started by: wakatana
0 Replies

7. Infrastructure Monitoring

Searching for Saas Monitor service which monitor my servers which are sitting in different providers

Sorry if this is the wrong forum Searching for Saas Monitor service which monitor my servers which are sitting in different providers . This monitor tool will take as less CPU as possible , and will send info about the server to main Dashboard. The info I need is CPU / RAM / my servers status (... (1 Reply)
Discussion started by: umen
1 Replies

8. UNIX for Advanced & Expert Users

Script monitor website wth default tomcat script

Hi all, on our application server we have the following script that monitor the status of the website, my problem here is that i have edite the retries from 3 to 5, and the timewait to 120 second, so the script should check 5 times every 2 minutes, and if the fifth check fails it must restart... (0 Replies)
Discussion started by: charli1
0 Replies
CATDIC(1)						      General Commands Manual							 CATDIC(1)

NAME
catdic - Download a dictionary SYNOPSIS
catdic [{-cs|-cannaserver} canna-server] [-i|-u user-name] remote-dic [-l local-file] DESCRIPTION
catdic downloads a dictionary file to the current directory. The file downloaded is a dictionary file the dictionary name of which is remote-dic. It is in the user dictionary directory of the machine on which cannaserver(1M) is in operation. (Hereafter, this machine is called the remote host.) OPTIONS
-cs canna-server (or -cannaserver canna-server) Specifies the name of the server machine that contains a dictionary to be downloaded. -i Downloads the system dictionary. -u user-name Specifies the user name. Another user's dictionary can be referenced by this user name. -l local-file local-file is the dictionary file name. If it is omitted, the standard output will be assumed. EXAMPLES
% catdic test Outputs the contents of dictionary file ``test'' on the remote host, to the standard output. % catdic test -l test2.t Downloads dictionary file ``test'' on the remote host to current directory file ``test2.t''. SEE ALSO
cannaserver(1M), lsdic(1), mkdic(1) CATDIC(1)
All times are GMT -4. The time now is 02:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy