NI Home > Community > NI Discussion Forums

Components

Showing results for 
Search instead for 
Do you mean 
Reply
Active Participant
Christian_L
Posts: 663
0 Kudos

Syslog Component

Please post your questions or feedback on the Syslog Component here.
 
(This component will be posted within a week of the start of this thread. Until then the link above will return an error.)
Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Member
Joe_H1
Posts: 7
0 Kudos

Re: Syslog Component

 

Any chance your group has already developed a new reference library for RFC 5424 that obsoleted RFC 3164:

http://en.wikipedia.org/wiki/Syslog

One thing I like about the new standard is fractional second resolution on the timestamp, where 3164 only has whole seconds.

Thanks for all your help.

Member
xgatc
Posts: 65
0 Kudos

Re: Syslog Component

Hello

 

 

I have used syslog in LV for Windows in applications.  I wonder if there is a syslog in LV for Linux.  I would like to use syslog collector on Linux machine for our third party partner.

 

 

any suggstion is more than welcome.

 

 

cheers

 

 

xg    

Active Participant
Christian_L
Posts: 663

Re: Syslog Component

xg,

 

The LabVIEW Syslog client and collector is written completely in LabVIEW source code, so it can be run on any LabVIEW platform supporting UDP including Linux. You can copy the source files from your Windows system to Linux and they should work.

 

I have added two more downloads to the Developer Zone document which are a VI Package (*.vip) for use with VI Package Manager and a ZIP file containing the source files. Either one of these can be used to place the files directly on a Linux machine.

Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Member
xgatc
Posts: 65
0 Kudos

Re: Syslog Component

Hi, Christian

 

 

Many thanks.   is this  document       ni.com/devzone/cda/epd/p/id/5980  ?

 

 

I will have a go for that

 

cheers

 

xg

 

Member
xgatc
Posts: 65
0 Kudos

Re: Syslog Component

Hello, Christian

 

 

I  downloaded the syslog1206_source.zip, unzip and placed syslog directory under my LabVIEW 8.6/user.lib.

 

when I first tested the collector.vi example, it did not work. it turned out that the default port number of 514 is not working under Linux.

 

after I changed the default port to 6160 and also modified syslog_device.vi to have syslog port as 6160 and 6161, both collector.vi and device.vi examples work.

 

I now can start the collector.vi on Linux machine and run device.vi both on the Linux machine and on my windowXp Laptop.

 

 

again, many thanks

 

xg

 

      

 

Member
xgatc
Posts: 65
0 Kudos

Re: Syslog Component

Hello, Christian

 

 

I have an issue in using the Syslog Client application and wonder if you can suggest a way out.

 

I have two different applications ( LabView EXE) running on the same machine which like to send log message to the SyslogCollector ( running on another machine).  The current  syslog.device.init will only work for whichever the first running appllication,  it fails if the second application tries to call it.

 

is there a way to deal with this situation? or we can not run more than one appliaction on the same machine for sysLog Device. 

 

thanks

 

 

xiaofeng

 

  

Active Participant
Christian_L
Posts: 663

Re: Syslog Component

xiaofeng,

 

This will require using two different UDP port numbers on your local comuter, one for each LV EXE. Currently the Syslog API does not support setting the local UDP port number.

 

Until we have the chance to add this feature you can add it yourself by modifying the Syslog Devioce Init.vi and syslog_Device Function Engine.vi (Init case).

 

In this case there is a constant labeled 'regular syslog port'. You will want to convert this to a control and export it out through the VI terminal connector to the top level API where you can set it differently in each of your applications.

 

syslog device engine.png

Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.

Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Member
xgatc
Posts: 65
0 Kudos

Re: Syslog Component

many thanks, Christian,  I will have a go

 

 

xiaofeng

 

Member
clendon.gibson@canrig.com
Posts: 47
0 Kudos

Re: Syslog Component

The VI "Syslog Device Send.vi" has an error cluster based case structure. If an error is present, nothing is done.

 

If there is no error and the "Message Tag" and "Message Content" string controls are empty, then it tries to read the error cluster to create the syslog message.

 

The upshot is that errors reported in the error cluster will cause the syslog message to not be sent, even if the intent is to send the error message in the error cluster.