7 Replies - 1711 Views - Last Post: 01 December 2016 - 01:43 AM

#1 wtp  Icon User is offline

  • D.I.C Regular

Reputation: 26
  • View blog
  • Posts: 319
  • Joined: 08-December 11

Service to push when new logs are created

Posted 28 November 2016 - 11:04 AM

I want to create a client program that will push windows event logs to a server program when new logs are created. I've never did anything like this before so I'm looking for possible implementation ideas or things to consider. I think signalr may be able to do this but, and it's not installing on my machine now.
Is This A Good Question/Topic? 0
  • +

Replies To: Service to push when new logs are created

#2 maceysoftware  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 348
  • View blog
  • Posts: 1,493
  • Joined: 07-September 13

Re: Service to push when new logs are created

Posted 28 November 2016 - 12:31 PM

I would look into the EventLog class.

Seems to have the exact thing you want.

MSDN EventLog

I say seems as I haven't used it myself.
Was This Post Helpful? 1
  • +
  • -

#3 wtp  Icon User is offline

  • D.I.C Regular

Reputation: 26
  • View blog
  • Posts: 319
  • Joined: 08-December 11

Re: Service to push when new logs are created

Posted 28 November 2016 - 01:04 PM

View Postmaceysoftware, on 28 November 2016 - 12:31 PM, said:

I would look into the EventLog class.

Seems to have the exact thing you want.

MSDN EventLog

I say seems as I haven't used it myself.


I should have been more clear. I've already used that class. But now I'm wondering how I can send the logs each time a new one is created.
Was This Post Helpful? 0
  • +
  • -

#4 maceysoftware  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 348
  • View blog
  • Posts: 1,493
  • Joined: 07-September 13

Re: Service to push when new logs are created

Posted 29 November 2016 - 05:16 AM

You could look into a client/server type of application and communicate and pass data using TCP?
Was This Post Helpful? 1
  • +
  • -

#5 wtp  Icon User is offline

  • D.I.C Regular

Reputation: 26
  • View blog
  • Posts: 319
  • Joined: 08-December 11

Re: Service to push when new logs are created

Posted 29 November 2016 - 05:17 PM

View Postmaceysoftware, on 29 November 2016 - 05:16 AM, said:

You could look into a client/server type of application and communicate and pass data using TCP?


I'm looking for a way to have multiple servers send messages to a single client, where the client does not request the information. Like an event/subscriber pattern with a single subscriber.

Basically in pseudocode
Server (senders of messages)
while(true){
  if(theresANewLog())
    send(log)
} 


Server (single receiver of all messages)
while(true){
  if(iRecievedLog())
    save(log)
}



If you can post a tutorial that I could use to create this, it would greatly be appreciated.

This post has been edited by wtp: 29 November 2016 - 05:22 PM

Was This Post Helpful? 0
  • +
  • -

#6 maceysoftware  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 348
  • View blog
  • Posts: 1,493
  • Joined: 07-September 13

Re: Service to push when new logs are created

Posted 30 November 2016 - 03:00 AM

I refer you to the client server pattern again, don't be put off by the terms client and server, this merely means that the client or clients will talk to the server application.

It doesn't mean that the client application has to be installed on a client machine and a server application will have to be installed on a server.

So your servers will have the client application installed which will react to new events and send them on to the server application. While your server application listens for the incoming information.

Since my post yesterday there is another way you could do this and that is to just simply right to a database that both the client and the server can see. That way the client will just write the events to a table, and the server will just read them in and do whatever it needs to do.

This would most likely be a lot easier too.

I can't really write you a whole tutorial on how to do this as I am currently at work, and even in my spare time i doubt I would find the time to do it.
Was This Post Helpful? 1
  • +
  • -

#7 wtp  Icon User is offline

  • D.I.C Regular

Reputation: 26
  • View blog
  • Posts: 319
  • Joined: 08-December 11

Re: Service to push when new logs are created

Posted 30 November 2016 - 12:46 PM

Thats the answer. Ive been overthining it/not communicating well. Turns out theres a web service up and I just need to post to it.
Was This Post Helpful? 0
  • +
  • -

#8 maceysoftware  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 348
  • View blog
  • Posts: 1,493
  • Joined: 07-September 13

Re: Service to push when new logs are created

Posted 01 December 2016 - 01:43 AM

Your welcome.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1