Syslog-NG directory name with IP address instead of hostname
Hi When I receive the application messaged from a different server to my syslog-ng server it is trying to create the messages under the directory name with IP address instead of the Application Server Hostname. What can be done baout this?? i used the following options in syslog-ng.conf options { use_fqdn(no); flush_lines(0); keep_hostname(yes); check_hostname(yes); chain_hostnames(yes); create_dirs(yes); dir_owner(root); dir_group(test); dir_perm(0750); #use_dns(persist_only); use_dns(yes); #dns_cache_hosts(/etc/hosts); dns_cache(yes); dns_cache_expire(87600); ts_format(iso); # keep_timestamp(no); }; -- Appreciate your quick help.. Kaladhar
we would need to see the destination definition to assist Jim On 06/05/2014 01:59 PM, Justin B wrote:
Hi
When I receive the application messaged from a different server to my syslog-ng server it is trying to create the messages under the directory name with IP address instead of the Application Server Hostname. What can be done baout this??
i used the following options in syslog-ng.conf
options { use_fqdn(no); flush_lines(0); keep_hostname(yes); check_hostname(yes); chain_hostnames(yes); create_dirs(yes); dir_owner(root); dir_group(test); dir_perm(0750); #use_dns(persist_only); use_dns(yes); #dns_cache_hosts(/etc/hosts); dns_cache(yes); dns_cache_expire(87600); ts_format(iso); # keep_timestamp(no); };
--
Appreciate your quick help..
Kaladhar
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
destination r_dest { file("/u01//$HOST_FROM/messages.$YEAR.$MONTH.$DAY.$HOUR" owner(root) group(test) perm(0640) template("|${S_FULLDATE}|${ETYPE}|${EHOSTNAME}|${ESOURCE}|${EOUTCOME}|${EMSG}|${EUSERID}\n") ); }; Here you go.. Also how to control the java stack trace exception that I receive in EMSG COLUMN in the above. On Thu, Jun 5, 2014 at 8:53 PM, Jim Hendrick <jrhendri@roadrunner.com> wrote:
we would need to see the destination definition to assist
Jim
On 06/05/2014 01:59 PM, Justin B wrote:
Hi
When I receive the application messaged from a different server to my syslog-ng server it is trying to create the messages under the directory name with IP address instead of the Application Server Hostname. What can be done baout this??
i used the following options in syslog-ng.conf
options { use_fqdn(no); flush_lines(0); keep_hostname(yes); check_hostname(yes); chain_hostnames(yes); create_dirs(yes); dir_owner(root); dir_group(test); dir_perm(0750); #use_dns(persist_only); use_dns(yes); #dns_cache_hosts(/etc/hosts); dns_cache(yes); dns_cache_expire(87600); ts_format(iso); # keep_timestamp(no); };
--
Appreciate your quick help..
Kaladhar
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
-- Kaladhar
well - if you look in the documentation, I think you would see it - but "HOST_FROM" is IP address, "HOST" is name if it resolves and address otherwise. Not sure about your other question. Jim On 06/05/2014 09:06 PM, Justin B wrote:
destination r_dest { file("/u01//$HOST_FROM/messages.$YEAR.$MONTH.$DAY.$HOUR" owner(root) group(test) perm(0640) template("|${S_FULLDATE}|${ETYPE}|${EHOSTNAME}|${ESOURCE}|${EOUTCOME}|${EMSG}|${EUSERID}\n") ); };
Here you go..
Also how to control the java stack trace exception that I receive in EMSG COLUMN in the above.
On Thu, Jun 5, 2014 at 8:53 PM, Jim Hendrick <jrhendri@roadrunner.com <mailto:jrhendri@roadrunner.com>> wrote:
we would need to see the destination definition to assist
Jim
On 06/05/2014 01:59 PM, Justin B wrote:
Hi
When I receive the application messaged from a different server to my syslog-ng server it is trying to create the messages under the directory name with IP address instead of the Application Server Hostname. What can be done baout this??
i used the following options in syslog-ng.conf
options { use_fqdn(no); flush_lines(0); keep_hostname(yes); check_hostname(yes); chain_hostnames(yes); create_dirs(yes); dir_owner(root); dir_group(test); dir_perm(0750); #use_dns(persist_only); use_dns(yes); #dns_cache_hosts(/etc/hosts); dns_cache(yes); dns_cache_expire(87600); ts_format(iso); # keep_timestamp(no); };
--
Appreciate your quick help..
Kaladhar
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
-- Kaladhar
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
what do you mean on controlling the java stack trace exception? if that means that it may contain newlines, you may be interested in the $(indent-multi-line) template function. On Fri, Jun 6, 2014 at 3:06 AM, Justin B <justinkala@gmail.com> wrote:
destination r_dest { file("/u01//$HOST_FROM/messages.$YEAR.$MONTH.$DAY.$HOUR" owner(root) group(test) perm(0640)
template("|${S_FULLDATE}|${ETYPE}|${EHOSTNAME}|${ESOURCE}|${EOUTCOME}|${EMSG}|${EUSERID}\n") ); };
Here you go..
Also how to control the java stack trace exception that I receive in EMSG COLUMN in the above.
On Thu, Jun 5, 2014 at 8:53 PM, Jim Hendrick <jrhendri@roadrunner.com> wrote:
we would need to see the destination definition to assist
Jim
On 06/05/2014 01:59 PM, Justin B wrote:
Hi
When I receive the application messaged from a different server to my syslog-ng server it is trying to create the messages under the directory name with IP address instead of the Application Server Hostname. What can be done baout this??
i used the following options in syslog-ng.conf
options { use_fqdn(no); flush_lines(0); keep_hostname(yes); check_hostname(yes); chain_hostnames(yes); create_dirs(yes); dir_owner(root); dir_group(test); dir_perm(0750); #use_dns(persist_only); use_dns(yes); #dns_cache_hosts(/etc/hosts); dns_cache(yes); dns_cache_expire(87600); ts_format(iso); # keep_timestamp(no); };
--
Appreciate your quick help..
Kaladhar
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
-- Kaladhar
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
-- Bazsi
participants (3)
-
Balazs Scheidler
-
Jim Hendrick
-
Justin B