• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

How can my program tunnel

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am working in an environment where we have 8 app server instances spread across 4 unix machines. There are other servers too. We need to monitor the log files from these servers on a regular basis. At present we use a hard token to enter into the datacenter from our network and usually hop around a few machines to get to the log files and we end up opening a dozen or so unix sessions. Can we write a small aplication which can pull these files and stream it to me periodically. For example a swing application.. My problem is how can make the application tunnel through the different machines ( given that there are only a few ports opened, I am told).
Hope I explained my problem. Are there any products that do similar stuff ?
How do I go about this task.. Any pointers are a lot of help.
thanks
sri
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A better idea might be to have your servers log to a central log host. Then process/monitor your logs on that particular host. There are several loggers out there that will do that such as syslog-ng, even the standard syslog that comes on Unix machines will log to different hosts. You can do this via sockets in Java but it would probably be more work than it is worth considering there are open source tools out there that will do the work for you. If you want to have some sort of Swing interface on the front to look at logs on your central host then that is just a matter of reading in the log files and putting together a useful interface...
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well - if these machines are unixes, you could use cron and the crontab-files, to push the logfiles hourly. This could be done with ftp/ tftp.
Using xmail to push the files would be a typical unix-solution too.
If you want to implement a scheduler in java have a look at jquar(t)z - not sure about the 't'.
If you insist in pulling, again I would think of using ftp to get the files - ftp was build for that .
 
yedi sri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the information. Please bear with my lack of knowledge in networking related issues.Let me explain my situation better.
In my environment, I can not do a ftp to any of the servers from my win2k desktop. To login to these servers, I use putty to connect to one particular machine which gives a number during the autorization to which I have to match with a number generated at that moment on a hardware token given to me. Once this is done I have to connect to a few of the machines again using putty. I login to yet other machines through some of these. This is the hopping I am talking about. To reach a machine z I go through a y and then to z using ssh in each stage. For example, I cannot access the appservers's admin consoles from my win2k unless I tunnel through putty. And that I can do only a few at a time. I have occasion to monitor more than 10 admin consoles at a time, to give you an idea. If I can make it happen it can save a lot of manual work. Now tell me, How can my swing application acheive the consolidation of all this.
Appreciate your help.
sri
 
Andrew Hamilton
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, your best bet would be to consolidate the logs at log time instead of trying to get them together at a later time. Small udp packets don't make much impact on the network, but large files going across do. Use a good logger to consolidate to a log host. This is just a good practice in general. If you cannot do this via that method there is a way to do this maybe via RMI but that would depend a lot on your network constraints. My guess is you wouldn't be able to do it anyway. Your network seems paranoid which is not a bad thing, but that makes it difficult to run the servers and clients you would need to do this.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yedi: and do you look at the logfiles using putty, or do you transfer them?

I used putty only once, and it's three years ago.
I guess you may configure putty to use a special port / protocol, telnet or ssh.

Can you ask, which ports and protocols are open for your access?

A complicated solution would be to use the NetComponents.jar (google), create a Telnetsession with the parameters used by putty, and redirecting input/outputstreams, using Runtime, to start the ssh - session.

Perhaps there is a ssh-implementation available in Java too.
 
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic