Event ID

James Kingston james.kingston at gmail.com
Mon Jul 5 23:07:01 CEST 2004


> Thanks the idea!
> 
> One last question: if I run md5sum twice for the same data it will
> produce the same output? This is important us to provide the same ID for
> same notifications which will be sent by SMS and by e-mail?
> 
> I don't know much about MD5 tools, but I will read about it and try to
> use!
> 
> Thanks again, Tamas!
> 


Yes... if the data you're providing to the checksum program/library is
identical the checksum will be identical.

if you're using perl for your script:

sub getmsgid ($)
{
   my $string = shift;
   use Digest::MD5;
   my $ctx = Digest::MD5->new;
   $ctx->add($string);
   return substr ($ctx->hexdigest, 22, 10);
}

I think in php there is also a md5sum($string) function


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list