Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Users

SNMP-Monitoring of Heartbeat

 

 

Linux-HA users RSS feed   Index | Next | Previous | View Threaded


Nils.Hildebrand at bamf

Jun 30, 2008, 4:45 AM

Post #1 of 4 (226 views)
Permalink
SNMP-Monitoring of Heartbeat

Hi,

can you give a short outline how to include the heartbeat-snmp-subagent into the main agent?

Can v1-clusters be monitored using snmp, too?

Kind regards, Nils


> -----Original Message-----
> From: linux-ha-bounces[at]lists.linux-ha.org
> [mailto:linux-ha-bounces[at]lists.linux-ha.org] On Behalf Of
> Michael Schwartzkopff
> Sent: Wednesday, June 11, 2008 9:32 AM
> To: General Linux-HA mailing list
> Subject: Re: [Linux-HA] (no subject)
>
> Am Mittwoch, 11. Juni 2008 08:45 schrieb Schmidt, Florian:
> > Hi everybody,
> >
> > after 3 months of studies, I'm back on my HA-cluster. =)
> >
> > First thing to do is now to integrate something to send some
> > information to an admin if errors occur (heartbeat-link
> dead, failed
> > to start some resource etc.). I don't find any
> documentation about the
> > MailTo RA on the linux-HA website and so does google.
> What's the way to integrate this?
> >
> > Is it powerful enough to send different messages in case of
> different
> > errors? If it isn't: what's the better way to do this?
> >
> > Regards,
> >
> > Florian
>
> Hi,
>
> MailTo sends a mail every time it is started or stopped. If
> you put into a group on the last position you will get a mail
> every time any resource of the group changes its state.
>
> But a better way of monitoring would be to use an external
> network monitoriing system (i.e. nagios) to look after the
> cluster. heartbeat provides a nice SNMP subagent that
> reflects the state of the cluster (nodes, resources). You can
> monitor this state with check_snmp of the external NMS.
>
> Advances:
> 1) Have a third system monitor the cluster. So you will get
> notice of the whole cluster breaks and cannot send any mail anymore.
>
> 2) NMS (i.e. nagios) have a very powerful escalation system
> which a plain MailTo resource cannot provide.
>
> Greetings,
> --
> Dr. Michael Schwartzkopff
> MultiNET Services GmbH
> Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany
> Tel: +49 - 89 - 45 69 11 0
> Fax: +49 - 89 - 45 69 11 21
> mob: +49 - 174 - 343 28 75
>
> mail: misch[at]multinet.de
> web: www.multinet.de
>
> Sitz der Gesellschaft: 85630 Grasbrunn
> Registergericht: Amtsgericht München HRB 114375
> Geschäftsführer: Günter Jurgeneit, Hubert Martens
>
> ---
>
> PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B
> Skype: misch42
> _______________________________________________
> Linux-HA mailing list
> Linux-HA[at]lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


misch at multinet

Jun 30, 2008, 2:13 PM

Post #2 of 4 (215 views)
Permalink
Re: SNMP-Monitoring of Heartbeat [In reply to]

Hildebrand, Nils, 232 schrieb:
> Hi,
>
> can you give a short outline how to include the heartbeat-snmp-subagent into the main agent?
>
> Can v1-clusters be monitored using snmp, too?
>
> Kind regards, Nils


Hi,

short answer:

everything about heartbeat integration in the net-snmp system and the
nagios monitoring system is described in:

http://www.oreilly.de/catalog/linuxhaclusterger/index.html

The other short answer:
Read the README file in the snmp_subagent directory of the source files.

Long version for those that are not able to read the README:
1) ./ConfigureMe config --enable-snmp-subagent
This part is done on the most distributions.

2) in snmpd.conf
# create a SNMPv1/SNMPv2 community
rwcommunity public

# this makes the snmpd a master snmp agent, which can
# support AgentX subagents.
master yes

# this defines your localhost as the trapsink. so traps
# or rather the SNMPv2 informs, will be sent to localhost.
trap2sink localhost


3) $ snmpwalk -v2c localhost -c public LinuxHA

Should work. Otherwise check version 1 of SNMP.
BEWARE: Debian starts the snmpd only on 127.0.0.1!

SNMP works very good in heartbeat, now.

Greetings,

Michael.
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Nils.Hildebrand at bamf

Jul 2, 2008, 4:04 AM

Post #3 of 4 (200 views)
Permalink
RE: SNMP-Monitoring of Heartbeat [In reply to]

Hi Michael,

> [...]
> everything about heartbeat integration in the net-snmp system
> and the nagios monitoring system is described in: [...]

Jaja - hab' ich schon bestellt. ;-)

> The other short answer:
> Read the README file in the snmp_subagent directory of the
> source files.

I am using the bin-rpms from SLES 10 SP2...

Which heartbeat-rpm should contain the snmp-stuff?


> > Long version for those that are not able to read the README:
> 1) ./ConfigureMe config --enable-snmp-subagent This part is
> done on the most distributions.

How can I check wether HB has been compiled that way?

Why is there no man-page about this topic?

> 2) in snmpd.conf
> # create a SNMPv1/SNMPv2 community
> rwcommunity public

Why rw? ro should be enough...
You can do some nasty things with snmp-write-commands...

> # this makes the snmpd a master snmp agent, which can #
> support AgentX subagents.

> master yes

According to "man snmpd.conf" it should be "master agentx"?

How can I determine wether this works?

> [...]

> 3) $ snmpwalk -v2c localhost -c public LinuxHA

LinuxHA: Unknown Object Identifier (Sub-id not found: iso -> LinuxHA)

I guess I have to put the mib for Heartbeat somewhere the snmp-client
can find it.

> Should work. Otherwise check version 1 of SNMP.

Version 2c should work - I see the other mibs there.

> BEWARE: Debian starts the snmpd only on 127.0.0.1!

BTW: Does the AgentX open a security-hole? How can I restrict
registering to the local host?

> SNMP works very good in heartbeat, now.



> Greetings,
>
> Michael.

Kind regards,

Nils
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


misch at multinet

Jul 2, 2008, 4:29 AM

Post #4 of 4 (198 views)
Permalink
Re: SNMP-Monitoring of Heartbeat [In reply to]

Am Mittwoch, 2. Juli 2008 13:04 schrieb Hildebrand, Nils, 232:
> Hi Michael,
>
> > > Long version for those that are not able to read the README:
> >
> > 1) ./ConfigureMe config --enable-snmp-subagent This part is
> > done on the most distributions.
>
> How can I check wether HB has been compiled that way?
>
> Why is there no man-page about this topic?

Does the binary /ur/lib/heartbeat/hbagent exist? If yes, all OK. If not,
search in other directories like: find /usr -name "hbagent".

But I think in MOST distributions the SNMP subagent is enabled.

> > 2) in snmpd.conf
> > # create a SNMPv1/SNMPv2 community
> > rwcommunity public
>
> Why rw? ro should be enough...
> You can do some nasty things with snmp-write-commands...

OK. The complete story (You asked for it!):
com2sec readonly <manager> <community>
group MyHBGroup v1 readonly
view heartbeat included 1.3.6.1.4.1.4682
access MyHBGroup "" any noauth exact heartbeat none none

See /etc/snmp/snmpd.conf for more examples.


> > # this makes the snmpd a master snmp agent, which can #
> > support AgentX subagents.
> >
> > master yes
>
> According to "man snmpd.conf" it should be "master agentx"?

Both work. I also would prefer
master agentx

> How can I determine wether this works?

netstat -nlp --protocol unix

see if a socket agentx exists. DO NOT FORGET to restart your snmp daemon!

> > [...]
> >
> > 3) $ snmpwalk -v2c localhost -c public LinuxHA
>
> LinuxHA: Unknown Object Identifier (Sub-id not found: iso -> LinuxHA)
>
> I guess I have to put the mib for Heartbeat somewhere the snmp-client
> can find it.

Better:
snmpwalk -mALL -v2c localhost .enterprises
or if no MIB availabe:
snmpwalk -v2c localhost .enterprises.4682

>
> > Should work. Otherwise check version 1 of SNMP.

NO OTHER MIBs for v2c in the enterprises part!!!

> Version 2c should work - I see the other mibs there.
>
> > BEWARE: Debian starts the snmpd only on 127.0.0.1!
>
> BTW: Does the AgentX open a security-hole? How can I restrict
> registering to the local host?

It is a local socket. So no security hole if you control you own computer. If
not, you lost anyway.

--
Dr. Michael Schwartzkopff
MultiNET Services GmbH
Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany
Tel: +49 - 89 - 45 69 11 0
Fax: +49 - 89 - 45 69 11 21
mob: +49 - 174 - 343 28 75

mail: misch[at]multinet.de
web: www.multinet.de

Sitz der Gesellschaft: 85630 Grasbrunn
Registergericht: Amtsgericht München HRB 114375
Geschäftsführer: Günter Jurgeneit, Hubert Martens

---

PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B
Skype: misch42
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Linux-HA users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.