Programming :: Read Through Syslog And Translate IP's?
Dec 8, 2010
I've got a cisco error log which is pulled and mailed out via the following code (values are written to a mysql db). I really need to make the IP's in the second column hostnames,I don't really know how to start.I'll paste the code I've got and someone can come up with a bright idea
I am setting some environmental variable in my .bashrc , the sample code I was provided with is for CSH but I am using bash, and there are some syntax differences between them ... I got most of the script to work, but I am getting an error at this part :
Code: if ($RMSTREE == $RMANTREE) then set path=($path $RMANTREE/bin) else
Also, the CSV file is updates every few hours and I need to load any new data from the file to the database without creating duplicates of data that has already been loaded to the database.
I am looking for an open source syslog server which accumulate the each and every log of Windows, Solaris, Linux and network devices. Currently I am using Syslog-ng which is not fulfiling my requirement in Windows clients, as I need the logs of every action which user performed after logon.
I want read the log messages to my 'c' application , i am using the fedora core 8 operating system , how to read the system log messages(syslog) through my application.
in the directory of /var/log , i see some directory like apache2 , apt , gdm , i wonder does all these folders was made under the syslogd ? i mean do these utilities use syslogd to log their messages or they use their own systems , for example apache use syslog or use its own library?
I am trying to generate a UDP syslog packet from my C application. But I am facing a problem with a Cisco Router ACE that does not like the Source Port being '0' and thus drops the packet.How can I specify the Source Port in the UDP header to '514' as stated in RFC3164 (Section 2: Transport Layer Protocol)? "It is RECOMMENDED that the source port also be 514 to indicate that the message is from the syslog process of the sender"
wants to remove everything else that (presumably) has syslog as a dependency. how do I replace the dependency on syslog with a dependency on syslog-ng?
I noticed in my system that my root partition is getting full. I found a lot of old compacted syslogfiles. Had a look at etc/sysconfig editor eg cron but could not find a setting which allows to delete files older than a month. Where and how could I influence this ? I deleted manually all syslog files older than a month. Approx 6GB
I have a server listening on incoming client connections. Once the client establishes SSL connection with the server, the server waits on read() from the client. Only Client can disconnect the connection. I want to have a timer in the server program to wait for x secs after read() and then disconnect the Client connection.
The main thing I want to know is: how to translate my GUI actions into command-line code. I want to know if there is a command that outputs all the commands being made by interaction with my GUI.Say, for example that I type this command and then open a file, the terminal would then print: "gnome-open /{path to file}".(The reason I ask is because I need to know a command to open with a non-default program. I have downloaded MiniCopier, so I want to add a launcher for it to my panel, by figuring out the code to launch it, but the default app to open ".jar" files is archive manager, rather than Java, so "gnome-open" doesn't do the trick. I've even changed the default to Java and still "gnome-open" uses archive manager, while double-clicking will use the new default=java. Weird...)
I have 4 linux nat firewall boxes on 4 seperate networks all plugged into one WRT54G with the wireless function disabled. The WAN port is DHCP to my ISP modem (comcast.) WRT54G is set to gateway mode. WRT54G is not handing out IP's to clients, DHCP set to disable. Modem is a bridge and hands out dynamic internet routable ip addresses. All 4 linux boxes eth0 are static ip's and go to the WRT54g. Each Linux box is a dhcp nat firewalled router to my clients. Problem: DNS is not being resolved to my ISP from my clients. I can ping from a client to any where on the net or through my system. Tried placing the ISP DNS numbers in the /etc/resolv.conf file of servers but did not work.
Question does the WRT54G nat translate the ISP's DNS numbers also and to what? If so placing those numbers in the /etc/resolv.conf might solve the issue. Last bit of info. On one system there is 32 clients using win7 and dhcp. Some clients can surf all the time. Some never, some intermitently. IF I restart the server the above will applies to different clients. The same thing happens on the other 3 server systems. Attaching the Linux box directly to the modem and setting eh0 to DHCP I have no problems. I know it's not the linux boxes. It's placing the WRT54G between the modem and the Linux box that creates the loss of DNS resolution.
I'm following this guide : [URL]... to monitor SIP-connections on an Asterisk-server with Nagios. At some point the author mentions adding the following line to /etc/sudoers : nagios ALL= NOPASSWD: /usr/sbin/asterisk
I installed the gnome-gmail-notifier today and I noticed that it wasn't translated. Anyone who knows where to ask for a Swedish translation or how to contribute with one? It's a small application so I figure that it won't be much work to translate it. Not that I need to, but I like to have everything in the same language if possible.
title's confusing, but can't edit it. I may not know what I'm talking about, but does anyone want to have a go at translating this suggestion I dug up into one that Mint 7 would act on?
I have 2 machines running under Lucid Lynx (one a 32-bit laptop, the other a 64-bit desktop). I created on both an account for my wife, and she wants a french environment. Now, when I installed the language packs (using Language Support from System), and I logged into her account for the first time, I selected "language = french" on the login screen, and on the desktop, there was a popup window asking me whether I wanted to translate the desktop menus to french. I said yes, and that happened.However, I did more or less the same thing on the laptop, and although the keyboard is french, and the date and so on is french, I didn't get this popup window asking for a menu translation. Changing the login language, and then changing again to french, didn't trigger this.
Is there a way (command line ?) to trigger this automatic menu translation tool?I think that the language packs are all installed.
Because my ISP is blocking every IP port under 1000, I'd like my local nat'ed server to be able to translate incoming and outgoing traffic from some port above 1000 to the default server port locally.Example :
To connect to my IMAP server (default port : 143) from the outside,I'd connect to my public IP, port 1143 (opened and nat'ed to the right server on my router) and the server would translate this port to 143 on the same machine.I wish I could simply configure my router to do that but sadly Linksys doesn't permit such setting... I also could modify the listening port of my server but I prefear to keep the default port inside my network.I think that iptables is the right tool to do that and I never used it and I must say that this tool is not so easy to configure at first sigh
As a result of having mixed files from different filesystems, I have, in directory foo/, files with filenames in uppercase and files with filenames in lowercase. If I want to convert them to all uppercase how do I do it? Consider this will be later recorded into optical discs.
Im using bind9 as DNS server on my LAN, but it does not seem to translate its own hostname correctly for some reason. Other hosts is translated correctly, the problem only seems to apply to the DNS host itself. if i "ping <server_hostname>" from the server, it translates correctly. But if i "ping <server_hostname>" from the client it only says "unknown host" The client has the correct DNS-server assigned. How can i start troubleshooting this?
I try to use XML::Simple to read each 'feed' from following RSS from CNN. Some of the sets contains more than one feed item which has no unique identifier besides its contents.
Code: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <rssfeeds> <set id="1"> <!-- RSS feeds from feedburner.com !--> <!-- XBOX Scene !--> <feed updateinterval="30">http://feeds.feedburner.com/XboxScene</feed> </set> <set id="2"> <!-- RSS feeds from skynews.com !--> <!-- World News !--> .....
I have lirc but I haven't got the hang of it yet. Ive have made a lircmap.xml and put that file in /.xbmc/userdata but xbmc still doesn't respond to it. I have even tried /.xbmc/userdata/keymaps and nothing. You can say that I have lost faith in lirc. I there a program that can translate remote control signals to regular keyboard letters?
I am trying to write a script which can read the names of all folders within a given folder into separate variables. In effect, if a folder contains a folder "Folder1", "Folder2", "Folder3", the script would read those names into variables such as:
I need to read data from a socket but it should be always listening because data arrives continuously .. I thought something like this would do it but it doesn't work .... I already set the socket options before
I'm facing a problem in a - at least I though it would be - simple BASH script. I use 'awk' to find matching lines in a file, and then use while-read to modify each line matching the expr casted in awk. It looks like this:
Code:
function foo() { awk '$NF~/^./{print $NF}' FILE.TXT|while read line; do bla bla bla ...
[code]....
However, each time the execution hits the 'read choice' line, it doesn't prompt - as well as pause the excution - the user for a choice: it just passes it. This problem just happens inside the while loop.