Monitoring Blog
Release announcements, technical guides and monitoring insights from the ConSol team.
Jmx4Perl 0.70
Saturday, July 10, 2010 in Insights
I’m happy to announce the new jmx4perl release 0.70 with a lot of new features. The most exciting new stuff are configuration files and multi-checks for check_jmx4perl, a new Java client library and the start of a readline based JMX shell j4psh with syntax highlighting and command line completion. The Jmx4Perl summer update It took some time (and nerves), but finally jmx4perl is now available at version 0.70 with quite some new features. Although the jump in the version number is quite minor, this is probably the release with the largest feature delta to its predecessor. check_jmx4perl The documentation for check_jmx4perl has been largely extended. It contains now about 30 pages including a quick start style tutorial, background information and reference documentation. In addition to the …
Citrus with SOAP-ENV:mustUnderstand headers
Wednesday, May 19, 2010 in Insights
By setting the SOAP mustUnderstand header attribute to “1”, you indicate that the service provider must process the SOAP header entry. In case the service provider is not able to handle this special header a SOAP fault server error is sent back to the calling client. In this post I would like to point out an easy way to support these mustUnderstand headers when simulating SOAP WebServices with Citrus. This sample SOAP request header contains some mustUnderstand header entries: <SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > <com:UserID xmlns:com="http://www.consol.com/soap-mustunderstand" SOAP-ENV:mustUnderstand="1">123456789</com:UserID> </SOAP-ENV-Header> The service provider respectively the Citrus SOAP server simulation has to handle this UserID. Otherwise …
Überwachen von Eventlogs mit check_logfiles und einem Domain-Benutzer
Monday, April 12, 2010 in Insights
Seit der Version 3.2 von check_logfiles ist es einfach geworden, Eventlogs von Windows-Servern auszulesen, ohne auf diesen das Plugin installieren zu müssen. Es wird jetzt nur noch ein "Gatewayserver" sowie ein Domainbenutzer nagios benötigt. Auf dem Gatewayserver richtet man eine NSClient++-Umgebung ein und installiert das Plugin check_logfiles.exe. Der Zugriff auf die Eventlogs aller anderen Server geschieht dann mit Windows-Bordmitteln. Angenommen, zu diesem Zweck wurde der Benutzer nagios in der Domain NAPRAX eingerichtet, so formuliert man den Abschnitt "eventlog" in der check_logfiles-Konfigurationsdatei folgendermaßen: ```perl @searches = ({ tag => 'evt_sec', type => 'eventlog', eventlog => { eventlog => 'security', computer => '10.0.12.127', username => 'NAPRAX\nagios', password => …
Fileupload with perl, decorated with a progressbar
Tuesday, April 06, 2010 in Insights
With LWP you can easily upload a file from within a perl script. To add some sugar this small example shows how to show a progressbar during the upload. This is especially useful for giving feedback while uploading large files. This technique is based on LWP’s DYNAMIC_FILE_UPLOAD hook for sending files chunk by chunk. BTW, this feature is a good thing anyway in order to avoid sucking large files completely into memory before doing an upload. From the HTTP::Request::Common man-page: If you set the $DYNAMIC_FILE_UPLOAD variable (exportable) to some TRUE value, then you get back a request object with a subroutine closure as the content attribute. This subroutine will read the content of any files on demand and return it in suitable chunks. This allow you to upload arbitrary big files without …
Neues Release 4.2 von check_hpasm
Tuesday, March 30, 2010 in Insights
Es gibt mal wieder ein Update für check_hpasm, diesmal mit dem Schwerpunkt auf HP Bladesystems. Neu hinzugekommen ist die Überwachung von Sicherungen (Fuses) und Enclosure Managern. Ausserdem werden jetzt bei fehlerhaften Komponenten auch gleich die Spare-Part-Nummern angezeigt. Ein Beispiel: ```text check_hpasm --hostname blp121948 CRITICAL - power supply 1:1:6 is present, condition is failed (Ser: 2QGUD0AHLYY2JX, FW: ) (SparePartNum 500242-001), common enclosure c01 condition is degraded (Ser: GB3353DS6B, FW: 2.60) (SparePartNum 519345-001), power enclosure 1:1 'pwc1' condition is degraded, System: 'bladesystem c7000 enclosure g2', S/N: 'GB8953DS6B' common enclosure c01 condition is degraded (Ser: GB3353DW6B, FW: 2.60) fan 1:1:1 is present, location is 1, redundance is other, condition …
Jmx4Perl 0.65
Tuesday, March 30, 2010 in Insights
Jmx4Perl reaches is next evolution step, with a bunch of new features. The most important news are a new JDK 6 based JVM agent which allows monitoring of arbitrary Java applications (not only servlet containers) and the support for bulk read requests. The Jmx4Perl spring update Yeah, spring is coming and the growing energy needs some space to expand to ;-) jmx4perl goes into its next round with version 0.65 containing a lot of new, exciting features. JDK 6 JVM agent This version includes a generic JVM agent which can be used to instrument any Java application for usage with jmx4perl. The only prerequisite for now is a Sun JVM 6 since the agent uses the HttpServer included in Sun’s JVM implementation. This restriction will probably relaxed in a further version. This agent has been …
Removing attachments with JavaMail
Monday, March 29, 2010 in Insights
If you have ever sent or received mail messages via Java, chances are high that you have used JavaMail for this task. Most of the time JavaMail does an excellent job and a lot of use cases are described in the JavaMail FAQ. But there are still some additional quirks you should be aware of when doing advanced mail operations like adding or removing attachments (or “Parts”) from existing mails retreived from some IMAP or POP3 store. This post gives a showcase for how to remove an attachment from a mail at an arbitrary level which has been obtained from an IMAP store. It points to the pitfalls which are waiting and shows some possible solutions. The principles laid out here are important for adding new attachments to a mail as well, but that’s yet another story. JavaMail objects Before we …
Jmx4Perl 0.60 released
Sunday, February 28, 2010 in Insights
Jmx4Perl’s next release 0.60 is out in the wild. This release contains Refined error handling. Added support for overloaded JMX operations for ’list’ and ’exec' commands. ‘read’ operation can now be used without an attribute name in which case the value of all attributes is returned. This can be used directly with JMX::Jmx4Perl and the frontend jmx4perl. Support for Resin 3.1 added. ’exec’ operation can now deal with simple array arguments. Within the perl modules, put in an array ref for array arguments. This gets translated intoto a comma separated list of values in the request string. For string arrays this works only with simple content (i.e. no element containing a ‘,’), though. Removed legacy JDK 1.4 support. 0.36 is the one and only version for which the JDK 1.4 backport has been …
Damit dem Windows-Team nichts mehr entgeht - Allesfresser check_logfiles
Friday, February 26, 2010 in Insights
Folgende Anfrage wurde von einem Kunden an mich gerichtet: Jetzt kam von den Admin die Anfrage ob es nicht möglich ist alle Meldungen (winwarncrit) erstmal als Warning an Nagios zu melden, um dann bestimmte Meldungen nach und nach als Critical einzustufen, oder komplett zu verwerfen (exclude). Geht das? Vor dieser Aufgabenstellung dürften auch andere Nagios-Administratoren stehen. Die Windows-Leute sind durchaus an Nagios-Alarmen interessiert und wollen gerne alle Fehlermeldungen (WARNING und ERROR) aus dem Eventlog gemeldet bekommen. Da allerdings von vornherein noch nicht bekannt ist, was da alles an Meldungen auftaucht und man nicht um drei Uhr morgens von einem Alarm geweckt werden will, der im Eventlog als ERROR drinsteht, aber im Grunde harmlos ist, sollen zunächst sämtliche Events …
Citrus: More XPath validation power
Friday, February 26, 2010 in Insights
In my last post (citrus-xpath-validation-power) I solved a validation problem regarding generic XML data structures with some XPath expression power. Now in latest 1.1-SNAPSHOT version of Citrus things become even more straightforward. In the latest snapshot you are able to evaluate XPath expressions to different result types like boolean, string or number. Before that XPath expressions had to evaluate to DOM node result in validation. Therefore I used a quite tricky XPath expression to solve the problems in my last post: <receive with="statusResponseReceiver"> <validate path="/StatusResponseMessage/StatusList/Status[.='SAVED']" value="SAVED"/> <validate path="/StatusResponseMessage/StatusList/Status[.='NEW']" value="NEW"/> <validate …