R: Re: R: Re: Monitor all outbound connections from apps in warden


Michael Grifalconi <michael.grifalconi@...>
 

Hello Joseph,

I was able to do it, but it was not accurate enough, as 'netstat' prints the open connections in a specific moment, is good for persistent connection but can not catch a fast PUSH request for example.. I was following the suggestion of 
Dieu Cao
but I'm experiencing some problems, I'm going to bump that email right now!

Regards,
Michael

Il 12/06/15 11:36, CF Runtime <cfruntime(a)gmail.com> ha scritto:


I would expect this to be possible. The easiest thing would probably be to write a shell script that both runs your application, and also starts a script that does the netstat output. Then set that script to run as your apps custom start command "cf push my_app -c run_app_and_log.sh".

Joseph Palermo
CF Runtime Team



On Mon, Jun 1, 2015 at 12:07 AM, Michael Grifalconi <michael.grifalconi(a)studenti.unimi.it> wrote:

Hello, thank you for the hint!

I'd prefer to do something at application level, like a shell script to run in parallel to the application that every X seconds prints the output of netstat, as the standard output is taken as a log on CF apps. Is it possible?

(I'm really sorry and embarrassed about the spam after my email signature, this is due to my University and I can't avoid it :/ )

Thank you,
Michael


Il 29/05/15 20:06, Dieu Cao <dcao(a)pivotal.io> ha scritto:



You could set up a security group that logs all outbound connections. These are logged on the DEAs.
You would then need to correlate the warden handle with the application.

I'm working with the docs team on getting this feature properly documented.


Relevant stories where this feature was added.
[1] https://www.pivotaltracker.com/story/show/73905126

[2] https://www.pivotaltracker.com/story/show/90078842



I don't know how you would do this via buildpacks.

-Dieu
CF Runtime PM






On Fri, May 29, 2015 at 6:59 AM, Michael Grifalconi <michael.grifalconi(a)studenti.unimi.it> wrote:

Hello all, 

How can I monitor (and log) all the outbound connection made from an application?

I would like to do by editing buildpacks:

edit the buildpack to run a netstat command every 10 sec and send a log of the estabilished connections..



I would also be able to sniff the traffic, is it possible to run a tcpdump with some filters and send logs with the result? All by editing the buildpack. I think the process will not have the necessary privileges..



Any hint is appreciated!

Thank you!

Michael


_______________________________________________
cf-dev mailing list
cf-dev(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-dev





_______________________________________________
cf-dev mailing list
cf-dev(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-dev

_______________________________________________
cf-dev mailing list
cf-dev(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-dev




_______________________________________________
cf-dev mailing list
cf-dev(a)lists.cloudfoundry.org
https://lists.cloudfoundry.org/mailman/listinfo/cf-dev

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.