Koozali.org: home of the SME Server

monitoring status of disk redundacy and server uptime more simply

Offline electroman00

  • ****
  • 491
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #15 on: June 10, 2009, 10:59:48 PM »

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #16 on: June 10, 2009, 11:01:36 PM »
Do believe you missed the OP's point.

so, please, explain to me OP's point.. as far as I understand, he wants something sending a mail if something goes wrong.. well, there's no need for it, because all you have to do  is read the "insignificant" emails coming from the server..

then, please, help me to understand your answer to my post because it's late, I'm tired and my english comprehension may be faulty.

thank you

Stefano

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #17 on: June 10, 2009, 11:02:47 PM »
Very Rude Post

why?

edit: electroman, please read here, thank you

Stefano
« Last Edit: June 10, 2009, 11:10:01 PM by Stefano a.k.a. nenonano »

Offline electroman00

  • ****
  • 491
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #18 on: June 10, 2009, 11:14:23 PM »
I'm tired and my english comprehension may be faulty.
Stefano

Exactly.

This is an English forum, if you want to post in Spanish then use the Spanish forum.

Thanks for your rude post and derailing a very good thread topic.

You have a good day...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #19 on: June 10, 2009, 11:19:03 PM »
This is an English forum, if you want to post in Spanish then use the Spanish forum.

Stefano posted in Latin, and google was able to tell me it meant "repeated things help."

Quote
Thanks for your rude post and derailing a very good thread topic.

You have a good day...

I think if you really mean that you should lighten up a little.

OP is leading himself (and is being led) up the garden path, to think that a status web page will be more useful in the case of RAID failure than just reading the email notification which is already provided.

Nobody has yet told me why they want uptime notified.

Offline purvis

  • ****
  • 567
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #20 on: June 10, 2009, 11:28:56 PM »
OK 

SOME OF YOU GUYS ARE AHEAD OF ME AND THAT IS FANTASTIC !!!
yes we did need the server name in a automatic fashion
yes we did need other other information that can be returned like uptime and mdstat
modifications need to be made it the "webstatus1"  file script below and i will do that on a second edition of the script.
i am trying to keep this first server information page short so it can be viewed easily on a iphone or other device.
if it is keep short, it will make it easier for someone to review that does not have technical experience to read
      the page from some browser.

i would like to a second report that contains much more information as possible about the server.


ok
here is what i have that is working to provide a uptime and disk raid status report
this should provide the easiest to follow procedure for others like me who are just getting
their feet wet and need to crawl before we walk.
a second version will come out but here is the first for the guys to keep things simple.
evolution is necessary.
a wish list in new versions of sme server would be to have a status folder like "/primary/html/servstat" and
   have some information about the server placed into files upon bootup and/or an intermittent time scale.


instructions:

create two files and run the a command to update the system




create file "/usr/sbin/webstatus1"
---------------------------------
#!/bin/sh
mkdir -p /home/e-smith/files/primary/html/serverstatus
echo "Server Status Report"  > /home/e-smith/files/primary/html/serverstatus/status1.txt
echo ""  >> /home/e-smith/files/primary/html/serverstatus/status1.txt
echo "Location: Management Office" >> /home/e-smith/files/primary/html/serverstatus/status1.txt
echo "Name: server0"  >> /home/e-smith/files/primary/html/serverstatus/status1.txt
echo "Date of Report:" >> /home/e-smith/files/primary/html/serverstatus/status1.txt
date     >> /home/e-smith/files/primary/html/serverstatus/status1.txt
echo ""  >> /home/e-smith/files/primary/html/serverstatus/status1.txt
echo "Uptime: "  >> /home/e-smith/files/primary/html/serverstatus/status1.txt
uptime   >> /home/e-smith/files/primary/html/serverstatus/status1.txt
echo ""  >> /home/e-smith/files/primary/html/serverstatus/status1.txt
echo "Disk Redundacy Status:"  >> /home/e-smith/files/primary/html/serverstatus/status1.txt
cat /proc/mdstat   >> /home/e-smith/files/primary/html/serverstatus/status1.txt
echo ""  >> /home/e-smith/files/primary/html/serverstatus/status1.txt
echo "--end of report--" >> /home/e-smith/files/primary/html/serverstatus/status1.txt




create file "/etc/e-smith/templates/etc/crontab/custom1"
--------------------------------
*/5 * * * * root /usr/sbin/webstatus1


run this command
----------------
expand-template /etc/crontab



Offline electroman00

  • ****
  • 491
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #21 on: June 10, 2009, 11:34:19 PM »
it will make it easier for someone to review that does not have technical experience to read
      the page from some browser.


So you desire an htlm type page and/or pages?

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #22 on: June 10, 2009, 11:41:21 PM »
Exactly.

This is an English forum, if you want to post in Spanish then use the Spanish forum.

Thanks for your rude post and derailing a very good thread topic.

I'm italian, I usually speak italian.. I guess your italian is as good as my english, is it?

Quote
You have a good day...

what part of "it's late" don't you understand?

Stefano and... it might be the crisis

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #23 on: June 10, 2009, 11:47:31 PM »
i am trying to keep this first server information page short so it can be viewed easily on a iphone or other device.
if it is keep short, it will make it easier for someone to review that does not have technical experience to read
      the page from some browser.


purvis, mails sent from server are in plain text; I read them with my phone without problems

previuosly, I read them with a treo 270 smartphone...

you don't need any king of borwser, just a basic email client

Stefano and.. k.i.s.s. philosophy

Offline electroman00

  • ****
  • 491
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #24 on: June 10, 2009, 11:52:22 PM »
it will make it easier for someone to review that does not have technical experience to read
      the page from some browser.


So you desire an htlm type page and/or pages?

Offline purvis

  • ****
  • 567
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #25 on: June 10, 2009, 11:55:27 PM »
i am sorry about the code is not in blocks, i will learn.

I  want to answer a few reasons of why i am doing this.
The first is email.
It is just fantastic when the server emails errors and status of things gone wrong, like a raid redundacy failure.
If emails are not read for one reason or the other, nobody is going to catch a big problem. I use to see all these notices about there where new updates or failures i thought where did not hurt overlooking, so i did not read emails.
A few of my machines are not setup where you can even get to the email from the internet.
My emails sent to outside accounts such as yahoo, have placed my email into JUNK/SPAM Folders because of the way our servers are setup on the internet.
I do not want to give a administrators password to every person or even a few people, a web service does not need a password.
I can write programs to download and read the webpages from anyplace without a password or be bothered with blocked service ports.  Also i do not have to remember passwords to gain access to how a system is running. I am 52 now, what if i die or get hurt, i need others to fill in.


Simply put, by having information more easily to get to, a situation maybe found earlier, or information might be more easily gotten.

Ability to generate automatic emails are need along with the ability to forward emails, but many times in enviroments, it is simply overlooked or problems unforeseen cause us not to see or get a needed email notification.

I do appreciate the help i have gotten and i did not even know that an email would of been generated if the raid had failed.

TO THOSE OFFERING ADDITIONAL COMMANDS THAT DISPLAY SOME KIND OF STATUS FROM THE SERVER, PLEASE KEEP THEM COMING  FOR A ADDITIONAL PROGRAM TO CREATE A SECOND WEBPAGE WITH SERVER STATUSES.

thank you
paul

 


Offline electroman00

  • ****
  • 491
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #26 on: June 11, 2009, 12:20:26 AM »
purvis

Which one do you want emails or web pages, you already get admin email error status from sme.

I think what your after is this.

1 emails may not always be received, you may not be the admin.
2 you don't want all to have admin rights just to obtain the status.
3 you may request the info anywhere in the www from a browser or cell phone.

I think what your after is a small web that contains web pages for each desired status that anyone
that knows the secret link can view without a password possibly??

Senario....

Your a consultant and you do not want all admin emails from a 100 servers sent to you.
However your customer calls with a problem and you want to check the server status from your phone.

Certainly a viable concept.

I do have a script that does create a status html page, except it provides everything on 1 page.
hth

You can mod the script into multiple pages.

Offline purvis

  • ****
  • 567
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #27 on: June 11, 2009, 12:52:50 AM »
html page?

I like the plain text file, a html type page can read up the text file view it or a combination of text pages at one time.
Also i saw a php page a while back that would display some server information, it might of just been apache stuff, i do not remember.
I like the fact of a dynamic page as well in some php form, but i want to stay away from that for now. I know a lot of you guys are up on that stuff with the php code and that would be great, but again, i was concerned with the ability to easily read or copy a file with current information by other software. I also wanted to learn how to do some cron stuff.


I think a web viewable type page and/or pages is the first choice i had to place information retrieved, because there is a default ibay of primary already there and it could be easily read or copied to some others location as well.
I started out with .prn file but second thoughts led me to an .txt file, basically making it readable by many different sorts of programs.


------------------------------------
Hi Charlie,
On using the uptime program.
The uptime report is kool, it even tells us even the number of users on a server, WOW. Now, i can tell if any users are on the system before a reboot.
I find two things of importance that you may not. I like to have the dates and times of a boot on all computers, even a reboot is beneficial.  The uptime gives me fast information from when the last time a boot occurred. I once even had to write a windows service program that keep up with how long a computer stays up and running. This is vital information when you are trying to solve for problems of various kinds. Maybe there is a power or electrical problem, a problem of somebody booting the computer and not telling you they are doing so , maybe you are interested in if a computer was running at certain times for various reasons, the list can not be preconceived most of the times, but the information is very helpful.

The logs of computers booting or just how long the computer is running and when it is running does not get big, even over years.
I have found this information just too valuable to be overlooked when it is needed and uptime time can be a handy source of information.


I did  a little work on trying to create a log upon bootup that would write to a file of my choice but i am having problems there too.
Linux is just dandy if you know how to use it and i appreciate your hard unselfish work, sincerely, Paul.






Offline purvis

  • ****
  • 567
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #28 on: June 11, 2009, 01:20:18 AM »
Electroman,

Yes, you have been there.
This is all in house stuff for me, and not a hobby.
I have worried for years about a drive going down.
I plan on writing a program to read the webpage or file, at least on the drive redundacy status, then displaying the results if an error is detected also by users on windows workstations. My program can parse out the information.

I would be totally stupid to look a gift horse in the mouth, so yes, i am interested.
Being communication is becoming more and more with computers, i see a need with more servers, hence, the need for simple ways of checking them and by non-technical people as well.
thanks electroman

p.s.
I do not make money selling what i know, so that is the reason i was trying to do something on my own then if i posted it to share, it would not cause any hard feelings and i could give back some time to others that have given to me.
SO, IF YOU ARE NOT WILLING TO SHARE YOUR SCRIPT WITH THE WHOLE FORUM, WHICH IS PERFECTLY FINE AND I FULLY UNDERSTAND, I WOULD RATHER NOT SEE YOUR SCRIPT. IF YOU THINK ONLY A SMALL PART OF YOUR SCRIPT WOULD BE HELPFUL TO GET ME KICK STARTED, SPECIALLY IF IT PHP SCRIPT, I AM COULD USE THAT TO BUILD ON FOR A DYNAMIC STATUS WEBPAGE.

thanks again, paul




 




Offline electroman00

  • ****
  • 491
  • +0/-0
Re: monitoring status of disk redundacy and server uptime more simply
« Reply #29 on: June 11, 2009, 01:23:04 AM »
Just testing it now, will post when done 20 min or so.