Re: Network Monitor released
In news:464c8fee$0$8710$ed2619ec@ptn-nntp-reader02.plus.net,
Bernie <bernie@skipole.co.uk> wrote:
[color=blue]
> ... a GUI window appears, and hosts can be added,
> which Skipole Monitor will regularly ping ...[/color]
Easy to ignore ping requests, making the tool essentially useless.
Re: Network Monitor released
On 2007-05-17, Patrick <ptri.c.k@statrerv.corn> wrote:[color=blue]
> In news:464c8fee$0$8710$ed2619ec@ptn-nntp-reader02.plus.net,
> Bernie <bernie@skipole.co.uk> wrote:
>[color=green]
>> ... a GUI window appears, and hosts can be added,
>> which Skipole Monitor will regularly ping ...[/color]
>
> Easy to ignore ping requests, making the tool essentially useless.[/color]
Presumably if you are monitoring your own hosts you would accomodate
your Skipole Monitor installation. But if you're doing that, you might
as well use something like Nagios which can monitor all sorts of
different services, not just ping.
--keith
--
[email]kkeller-usenet@wombat.san-francisco.ca.us[/email]
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Re: Network Monitor released
Patrick wrote:
[color=blue]
> In news:464c8fee$0$8710$ed2619ec@ptn-nntp-reader02.plus.net,
> Bernie <bernie@skipole.co.uk> wrote:
>[color=green]
>> ... a GUI window appears, and hosts can be added,
>> which Skipole Monitor will regularly ping ...[/color]
>
> Easy to ignore ping requests, making the tool essentially useless.[/color]
Well, yes and no. Methinks you are too hard on the man. He had an itch and
he wrote some code. And he's good enough to give it away, which is good
intent.
If you want a fancy system, use nagios.
OTOH if the target "market" is people who want to see if a random server
just crashed, it's small-ish and simple-ish (yes I did give the code a very
quick browse) and you make sure you don't ignore ICMP pings on your boxes.
However, to the OP:
You could do better here I reckon, though:
############# pinger.py
....
class linpingtest(Thread):
"""Uses the linux os ping to ping a host"""
def __init__(self, ipaddress):
"""The class is passed the ipaddress of the host to be pinged"""
Thread.__init__(self)
self.ipaddress=ipaddress
def run(self):
"""When the start method is called, this 'run' operates in its own
thread"""
pinger=os.popen("ping -c 4 -n -q "+self.ipaddress, "r")
#### ^^^^^^^^^^^^^^^^^^^^^^^^^
self.fulloutput=pinger.read()
....
############
I'm a perl nut, thus I don't code much python (that would be heresy wouldn't
it ;-> ), but python *must surely* have a ping class like perl's Net::Ping
module which would save shelling out every time, would be more efficient
and simpler.
Also, to the OP, if you're going down this route, it is sometimes worth IME
in sending both ICMP pings and UDP pings (and maybe even TCP pings) (even
though the latter often needs to be turned on on the probed servers) as a
saturated or otherwise ill network is apt to lose UDP packets before any
others, which adds to the usefullness of the monitor system.
Just my 2p's worth...
Cheers
Tim
Re: Network Monitor released
On Thu, 17 May 2007 14:28:41 -0700 Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:
| Presumably if you are monitoring your own hosts you would accomodate
| your Skipole Monitor installation. But if you're doing that, you might
| as well use something like Nagios which can monitor all sorts of
| different services, not just ping.
Exactly. If a service goes down, or the OS just stops running userland
processes entirely (frozen disk drive being a common culprit), pings will
still come back, leading to a false positive if they are relied on. So
actually testing individual services is essential, including testing the
content (actually make HTTP requests to see if you still get the same
content, or actually do a shell command from an SSH login). Also you
might want to time the responses when you do that. Slow servers are just
as important to deal with as down servers.
--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / [email]spamtrap-2007-05-18-0838@ipal.net[/email] |
|------------------------------------/-------------------------------------|
Re: Network Monitor released
On 2007-05-18, [email]phil-news-nospam@ipal.net[/email] <phil-news-nospam@ipal.net> wrote:
[color=blue]
> So
> actually testing individual services is essential, including testing the
> content (actually make HTTP requests to see if you still get the same
> content, or actually do a shell command from an SSH login). Also you
> might want to time the responses when you do that. Slow servers are just
> as important to deal with as down servers.[/color]
Nagios can do this for a variety of services. I would be wary of
executing an ssh command through a Nagios plug-in, if only because
it means having some sort of dummy account around to be able to
run commands via a passwordless ssh key. But I ssh to all my boxes
enough that all I want to know is whether sshd is listening; I'll
know soon ehough if there's a real ssh problem.
--keith
--
[email]kkeller-usenet@wombat.san-francisco.ca.us[/email]
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
Re: Network Monitor released
On Fri, 18 May 2007 12:57:56 -0700 Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:
| On 2007-05-18, [email]phil-news-nospam@ipal.net[/email] <phil-news-nospam@ipal.net> wrote:
|
|> So
|> actually testing individual services is essential, including testing the
|> content (actually make HTTP requests to see if you still get the same
|> content, or actually do a shell command from an SSH login). Also you
|> might want to time the responses when you do that. Slow servers are just
|> as important to deal with as down servers.
|
| Nagios can do this for a variety of services. I would be wary of
| executing an ssh command through a Nagios plug-in, if only because
| it means having some sort of dummy account around to be able to
| run commands via a passwordless ssh key. But I ssh to all my boxes
| enough that all I want to know is whether sshd is listening; I'll
| know soon ehough if there's a real ssh problem.
If you regularly ssh in, should be no problem (until you see one).
--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / [email]spamtrap-2007-05-19-2133@ipal.net[/email] |
|------------------------------------/-------------------------------------|
Re: Network Monitor released
"Tim S" <ts@dionic.net> wrote in message
news:464ccd96$0$645$5a6aecb4@news.aaisp.net.uk...[color=blue]
> Patrick wrote:
>[color=green]
>> In news:464c8fee$0$8710$ed2619ec@ptn-nntp-reader02.plus.net,
>> Bernie <bernie@skipole.co.uk> wrote:
>>[color=darkred]
>>> ... a GUI window appears, and hosts can be added,
>>> which Skipole Monitor will regularly ping ...[/color]
>>
>> Easy to ignore ping requests, making the tool essentially useless.[/color]
>
> Well, yes and no. Methinks you are too hard on the man. He had an itch and
> he wrote some code. And he's good enough to give it away, which is good
> intent.
>
> If you want a fancy system, use nagios.
>
> OTOH if the target "market" is people who want to see if a random server
> just crashed, it's small-ish and simple-ish (yes I did give the code a
> very
> quick browse) and you make sure you don't ignore ICMP pings on your boxes.
>[/color]
Hi there - I note the emphasis by a previous mailer is monitoring servers,
and their services, which presumably is why he felt ping is 'essentially
useless'.
The itch I wrote Skipole Monitor for was a need to monitor a private network
of shops, spread across a wide geographic area. The aim was really to
monitor the links, and this monitor very simply shows the network is up.
The 'hosts' we ping are usually remote routers, switches, and tills, and
they very rarely crash or lose services (touch wood), our faults are more of
the line down, power unplugged, someone tripped over a cable, variety, which
ping shows up very nicely
You're right there are other tools - nagios and the like, but another
requirement was to be able to very simply set this up, at multiple sites, on
both linux and windows PC's, and also by relatively non-technical staff who
can easily understand the output - hence the smiley faces on the web output.
So simplicity was a key factor, and I believe the gui setup - and built in
web server, not requiring apache, or a database makes this very easy. We do
have more complex management tools - but its a matter of a simple tool
first, to check the obvious, followed by more sophisticated tools when the
problem is more subtle.
[color=blue]
> However, to the OP:
>
> You could do better here I reckon, though:
>
> ############# pinger.py
> ...
> class linpingtest(Thread):
> """Uses the linux os ping to ping a host"""
> def __init__(self, ipaddress):
> """The class is passed the ipaddress of the host to be pinged"""
> Thread.__init__(self)
> self.ipaddress=ipaddress
> def run(self):
> """When the start method is called, this 'run' operates in its own
> thread"""
>
>
> pinger=os.popen("ping -c 4 -n -q "+self.ipaddress, "r")
> #### ^^^^^^^^^^^^^^^^^^^^^^^^^
>
> self.fulloutput=pinger.read()
> ...
> ############
>
> I'm a perl nut, thus I don't code much python (that would be heresy
> wouldn't
> it ;-> ), but python *must surely* have a ping class like perl's Net::Ping
> module which would save shelling out every time, would be more efficient
> and simpler.
>[/color]
Yes - using the OS was quick and dirty, - having briefly looked I couldn't
find a python ping module, which doesn't mean there isn't one, I probably
just need to look harder! If anyone knows of one, let me know.
cheers
Bernie