Done some google search on this, and I can find a ton that just search for a domain, like yahoo.com, google.com, etc...
But I need to take one I found, and modify it to include port number. I have a bunch of apache instances that I manage and it's a pretty consolidated environment, so lots of apache servers using lots of different ports. One domain, like abc.com will point towards 2-4 apache instances on different servers/port number combinations.
Here is the code I found that worked well, but I need to be able to check them by servernameort rather than domain.com.
Edit: I know you can't use ping to specify a port number, but is there another way to send a packet to a serverort for the monitoring script?
You dont just ping ports. You would have to add a lot of code so it knows what to look for. If it didn't get a certain response then it would mark it as down and email you. Im sure there are scripts out there for monitoring ports.
nmap seems to somewhat give me what I need, unfortunately it doesn't just give me a 1 or a 0.
Is there any way to get only the open or closed output and then I could use an if statement to say, if closed send e-mail, if open exit.
But I'd need it ran through a loop because we have 10-20 apache instances on one server.
I got it to work using netcat. Unfortunately I wasn't thinking ahead, so now I have a script that sets a variable inside itself to about 30 different 5 digit port numbers. I copy/pasted that into a file so I have a file:
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Hi guyz,
Please send me a script which is to be sending an automatic email to particular mail id's when a job get complete with status successful.
Please send me your script to my mail id : rehan.csjmu@gmail.com
Thanks in Advance.
---------- Post updated at 11:33 AM ----------... (1 Reply)
Dear All,
I am new to unix scripting, i need to develop a alert system which get trigger when my scripts don't find any *.log file to copy from one directory to other directory.
In detail my scripts run every day and it create a dummy file and check all those *.log file 1 day old and copy them... (3 Replies)
Hi
I do a very simple monitoring of our OpenLDAP (runs in cronjob and generate alerts if unsuccessfull)
$ ldapsearch -h hostname.domain -D "cn=monitor_user,ou=People,dc=organisation" -w "password" -b "dc=organisation" -x "(&(cn=monitor_user)(ou=People))" dn | grep -v version
dn:... (4 Replies)
hi guys
my boss asked me for a tool to monitor and alert my Linux boxes... and some Win boxes... but not only monitor for high CPU Usage, hign memory usage and so on....he also wants a tool for historical data I mean something like
I want to know the CPU Usage and memory usage for the last... (1 Reply)
Hello
I have a server it is running more than 5 people
Scripts I want to send a warning to the administrator for the main server
All is written in the ssh strain
For example, when typing the following command "ls" " rm " and other
email sends the administrator for the main server
About it... (2 Replies)
Hi Gurus,
Currently I am learning UNIX through online forums and unix blogs. I have the below requirement.
I need to write a script to monitor server processes. For example, there are 3 processes currently running on the server.(java, pmrepagent, pmserver). If any of the process goes down,... (2 Replies)
hi,
i serarch monitoring and alert system.
when HDD and services are down. Send email and sms alert to me and help desk.
but i don't find any program.
Can you help me ?
Thanks. (1 Reply)
*This is not homework I am new to UNIX and want to try this Monitoring a file demo*
*If this is the wrong forum please move it - im new to the forums*
$1 = the file to be monitored
$2 = the time for the file to sleep
If the file gets changed (using -nt) it will send my username mail saying... (2 Replies)