Mailing List Archive

client
hi there,

Is there an example of client sending alert to syslog?

is it possible to create and send an alert from the command prompt to
syslog?

thanks,
Jules
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
Re: client [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jules Pagna Disso said the following on 19/01/09 15:23:

> Is there an example of client sending alert to syslog?

You mean something like the logger utility?

http://linux.about.com/library/cmd/blcmdl1_logger.htm


Ciao,
luigi

- --
/
+--[Luigi Rosa]--
\

She was a lovely girl.
Our courtship was fast and furious.
I was fast and she was furious.
--Max Kauffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl0khQACgkQ3kWu7Tfl6ZTTtwCgrgL4RTPoLiZoKaa0uw2mz9y/
KAYAnj/1BMfinxINNSgttd9TIOGfi/z4
=LxGV
-----END PGP SIGNATURE-----
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
Re: client [ In reply to ]
Jules Pagna Disso wrote:
> hi there,
>
> Is there an example of client sending alert to syslog?
>
> is it possible to create and send an alert from the command prompt to
> syslog?

Try:
$ logger "Test log message"

Regards,
Jack.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
Re: client [ In reply to ]
Jules Pagna Disso wrote:
> hi there,
>
> Is there an example of client sending alert to syslog?
>
> is it possible to create and send an alert from the command prompt to
> syslog?
>
> thanks,
> Jules

Do you mean 'logger' ?

Try 'man logger'.

Best regards,
Patrick

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
Re: client [ In reply to ]
hi there,

thanks for the answer it helped and does what I wanted. Now, I am wonder if
there is a sample code how to send log file from a c/c++ code to syslog
deamon.

thanks
Jules

2009/1/19 Patrick Shen <patrick.shen@net-m.de>

> Jules Pagna Disso wrote:
> > hi there,
> >
> > Is there an example of client sending alert to syslog?
> >
> > is it possible to create and send an alert from the command prompt to
> > syslog?
> >
> > thanks,
> > Jules
>
> Do you mean 'logger' ?
>
> Try 'man logger'.
>
> Best regards,
> Patrick
>
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
>
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
Re: client [ In reply to ]
I use this:

>gcc -o syslog_write syslog_writer.c
>./syslog_writer 300 <-- This is the number of messages it will write

#include <stdlib.h>
#include <syslog.h>
#include <stdio.h>

int main(int argc, char **argv) {
int num_syslogs = atoi(argv[1]), i;
openlog("syslog_writer", LOG_CONS | LOG_PID, LOG_LOCAL1);
for(i=0; i < num_syslogs; i++) {
syslog(LOG_NOTICE, "syslog_writer: log number %d", i);
}
return(1);
}

-----Original Message-----
From: rsyslog-bounces@lists.adiscon.com
[mailto:rsyslog-bounces@lists.adiscon.com] On Behalf Of Jules Pagna
Disso
Sent: Tuesday, January 20, 2009 1:15 PM
To: rsyslog-users
Subject: Re: [rsyslog] client

hi there,

thanks for the answer it helped and does what I wanted. Now, I am wonder
if
there is a sample code how to send log file from a c/c++ code to syslog
deamon.

thanks
Jules

2009/1/19 Patrick Shen <patrick.shen@net-m.de>

> Jules Pagna Disso wrote:
> > hi there,
> >
> > Is there an example of client sending alert to syslog?
> >
> > is it possible to create and send an alert from the command prompt
to
> > syslog?
> >
> > thanks,
> > Jules
>
> Do you mean 'logger' ?
>
> Try 'man logger'.
>
> Best regards,
> Patrick
>
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
>
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com


Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace.
Any dissemination, distribution or copying of the enclosed material is prohibited.
If you receive this transmission in error, please notify us immediately by e-mail
at abuse@rackspace.com, and delete the original message.
Your cooperation is appreciated.

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com