Bash/Syslog referer Address -
i have syslog server, need find out url has been used reach server. example have syslog1.example.com , syslog2.example.com, both of hit same server, in conf file filter url set , update database field based on value. have added fields database , using conf file able manipulate request, need referer url. have idea how can this.
obviously have managed else, have tried little towards part of task need know if possible , searches bringing results based on curl not need. if knows how can url, appreciated.
update
i have device has busybox , syslogd installed. able set address on device syslog, example 1.1.1.1:514. not able anymore on device other this.
i have example 100 devices, 50 type , 50 type b. issue when using 1.1.1.1:514 in every device syslog server address, when receiving device information on remote syslog server unable differentiate whether device type or type b.
i have following solution in mind, although there may way achieve this. if create 2 subdomains , point them same address, ie typea.example.com , typeb.example.com, in theory in devices type set remote syslog address typea.example.com:514 , type b, typeb.example.com:514. both of these subdomains point 1.1.1.1, therefore syslog information being received devices of type , devices of type b.
i need figure out how in syslog.conf on remote server, find out whether information received device using typea.example.com or typeb.example.com.
the server not have apache installed etc, however, in php example can use $_server , able retrieve information from, $_server['http_host']. there way in syslog.conf on remote syslog server.
as mentioned 1 solution have in mind , may not one. syslog new me , wrapping head around this. understand rather variable or parameters, syslog uses macros. none of macros provided seem give me information need.
i know can set syslog doing
syslogd -r 1.1.1.1:514 is there anyway here can include further information example:
syslogd -r 1.1.1.1:514 type=a then use $type value or alternatively add custom header syslog.
as can tell racking brains solutions , hitting brick walls. solution or docs may point me in right direction appreciated.
final point mention looking @ redirecting syslog info php script or c (i'll script know wrong) in order vet information there , insert db.
quite need way differentiate type or type b. clears matters , these not ramblings of mad man.
Comments
Post a Comment