Junos
Highlighted
Junos

Send traceoptions to a remote server

‎03-04-2020 07:24 AM

Having this configuration, so every time when a rotation is complete the traceoption files should be sent to a remote server.

The problem is that some of the rotation logs are not appearing in messages and the process cannot be triggered. How can this be done? More excessive logging can be enabled so messages will show when log rotation is completed for a specific protocol?

Or can this be done in another way?

 

set groups bng-trace system services dhcp-local-server traceoptions file trace-dhcpd
set groups bng-trace system services dhcp-local-server traceoptions file size 3m
set groups bng-trace system services dhcp-local-server traceoptions file files 3
set groups bng-trace system services dhcp-local-server traceoptions file world-readable
set groups bng-trace system services dhcp-local-server traceoptions flag all
deactivate groups bng-trace system services dhcp-local-server traceoptions flag all
set groups bng-trace system services subscriber-management traceoptions file trace-smg-service
set groups bng-trace system services subscriber-management traceoptions file size 3m
set groups bng-trace system services subscriber-management traceoptions file files 3
set groups bng-trace system services subscriber-management traceoptions file world-readable
set groups bng-trace system services subscriber-management traceoptions flag all
set groups bng-trace system auto-configuration traceoptions file trace-autoconf
set groups bng-trace system auto-configuration traceoptions file size 3m
set groups bng-trace system auto-configuration traceoptions file files 3
set groups bng-trace system auto-configuration traceoptions file world-readable
set groups bng-trace system auto-configuration traceoptions level error
set groups bng-trace system auto-configuration traceoptions flag all
set groups bng-trace system processes general-authentication-service traceoptions file trace-authd
set groups bng-trace system processes general-authentication-service traceoptions file size 5m
set groups bng-trace system processes general-authentication-service traceoptions file files 5
set groups bng-trace system processes general-authentication-service traceoptions file world-readable
set groups bng-trace system processes general-authentication-service traceoptions filter user "test03@qsc.de"
set groups bng-trace system processes general-authentication-service traceoptions flag configuration
set groups bng-trace system processes general-authentication-service traceoptions flag address-assignment
set groups bng-trace system processes general-authentication-service traceoptions flag all
deactivate groups bng-trace system processes general-authentication-service traceoptions flag all
set groups bng-trace system processes general-authentication-service traceoptions flag nasreq
set groups bng-trace system processes general-authentication-service traceoptions flag profile-db
set groups bng-trace system processes general-authentication-service traceoptions flag radius
set groups bng-trace system processes general-authentication-service traceoptions flag session-db
set groups bng-trace system processes general-authentication-service traceoptions flag user-access
set groups bng-trace system processes smg-service traceoptions file trace-smgd-service
set groups bng-trace system processes smg-service traceoptions file size 10m
set groups bng-trace system processes smg-service traceoptions file files 2
set groups bng-trace system processes smg-service traceoptions file world-readable
set groups bng-trace system processes smg-service traceoptions level notice
set groups bng-trace system processes smg-service traceoptions flag all
set groups bng-trace system processes dhcp-service traceoptions file trace-dhcp-serviced
set groups bng-trace system processes dhcp-service traceoptions file size 5m
set groups bng-trace system processes dhcp-service traceoptions file files 5
set groups bng-trace system processes dhcp-service traceoptions file world-readable
set groups bng-trace system processes dhcp-service traceoptions level error
set groups bng-trace system processes dhcp-service traceoptions flag all
deactivate groups bng-trace system processes dhcp-service traceoptions flag all
set groups bng-trace system processes dhcp-service traceoptions flag auth
set groups bng-trace system processes dhcp-service traceoptions flag database
set groups bng-trace system processes dhcp-service traceoptions flag general
set groups bng-trace system processes dhcp-service traceoptions flag interface
set groups bng-trace system processes dhcp-service traceoptions flag rpd
set groups bng-trace system processes dhcp-service traceoptions flag session-db
set groups bng-trace system processes dhcp-service traceoptions flag state
set groups bng-trace system processes dhcp-service traceoptions flag statistics
set groups bng-trace system processes dhcp-service traceoptions flag ui

 

 

set groups bng-trace event-options policy send-authd-trace events SYSTEM
set groups bng-trace event-options policy send-authd-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-authd"
set groups bng-trace event-options policy send-authd-trace then upload filename /var/log/trace-authd.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-authd-trace then upload filename /var/log/trace-authd.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-autoconf-trace events SYSTEM
set groups bng-trace event-options policy send-autoconf-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-autoconf"
set groups bng-trace event-options policy send-autoconf-trace then upload filename /var/log/trace-autoconf.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-autoconf-trace then upload filename /var/log/trace-autoconf.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-cosd-trace events SYSTEM
set groups bng-trace event-options policy send-cosd-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-cosd"
set groups bng-trace event-options policy send-cosd-trace then upload filename /var/log/trace-cosd.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-cosd-trace then upload filename /var/log/trace-cosd.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-dhcp-serviced-trace events SYSTEM
set groups bng-trace event-options policy send-dhcp-serviced-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-dhcp-serviced"
set groups bng-trace event-options policy send-dhcp-serviced-trace then upload filename /var/log/trace-dhcp-serviced.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-dhcp-serviced-trace then upload filename /var/log/trace-dhcp-serviced.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-dhcpd-trace events SYSTEM
set groups bng-trace event-options policy send-dhcpd-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-dhcpd"
set groups bng-trace event-options policy send-dhcpd-trace then upload filename /var/log/trace-dhcpd.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-dhcpd-trace then upload filename /var/log/trace-dhcpd.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-flow-tap-trace events SYSTEM
set groups bng-trace event-options policy send-flow-tap-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-flow-tap"
set groups bng-trace event-options policy send-flow-tap-trace then upload filename /var/log/trace-flow-tap.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-flow-tap-trace then upload filename /var/log/trace-flow-tap.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-l2tpd-trace events SYSTEM
set groups bng-trace event-options policy send-l2tpd-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-l2tpd"
set groups bng-trace event-options policy send-l2tpd-trace then upload filename /var/log/trace-l2tpd.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-l2tpd-trace then upload filename /var/log/trace-l2tpd.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-ppp-serviced-trace events SYSTEM
set groups bng-trace event-options policy send-ppp-serviced-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-ppp-serviced"
set groups bng-trace event-options policy send-ppp-serviced-trace then upload filename /var/log/trace-ppp-serviced.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-ppp-serviced-trace then upload filename /var/log/trace-ppp-serviced.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-pppoed-trace events SYSTEM
set groups bng-trace event-options policy send-pppoed-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-pppoed"
set groups bng-trace event-options policy send-pppoed-trace then upload filename /var/log/trace-pppoed.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-pppoed-trace then upload filename /var/log/trace-pppoed.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-smg-service-trace events SYSTEM
set groups bng-trace event-options policy send-smg-service-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-smg-service"
set groups bng-trace event-options policy send-smg-service-trace then upload filename /var/log/trace-smg-service.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-smg-service-trace then upload filename /var/log/trace-smg-service.0.gz destination logarch retry-count retry-interval 30
set groups bng-trace event-options policy send-smgd-service-trace events SYSTEM
set groups bng-trace event-options policy send-smgd-service-trace attributes-match system.message matches "trace_rotate: rotating /var/log/trace-smgd-service"
set groups bng-trace event-options policy send-smgd-service-trace then upload filename /var/log/trace-smgd-service.0.gz destination logarch retry-count 3
set groups bng-trace event-options policy send-smgd-service-trace then upload filename /var/log/trace-smgd-service.0.gz destination logarch retry-count retry-interval 30

 

Help is appreciated.

Regards,

Alexandru Minzat

3 REPLIES 3
Highlighted
Junos

Re: Send traceoptions to a remote server

‎03-05-2020 08:53 AM

Hi,

 

It's basically this... https://www.juniper.net/documentation/en_US/junos/topics/concept/junos-software-tracing-logging-oper...

Orrr hardcode it system wise...

https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/destinati...

 

KR

 

Adam

~~~~~~~~~~~~~~~~~~~~~~~
- Please Kudos if you found my response helpful
- Please accept my response as a 'Accepted Solution' if it solved your query
Highlighted
Junos

Re: Send traceoptions to a remote server

‎03-10-2020 02:32 AM

Yes, it is indeed.

But is there any way to do this different? Why does traceoption rotation logs are appearing in message only for rpd related protocols?

 

Regards,

Alex

Highlighted
Junos

Re: Send traceoptions to a remote server

‎03-10-2020 02:43 AM

Hi!


I believe that is because 'messages' are only stored for 'critical' or above status issues by default. You have to tell it to do otherwise.

https://www.juniper.net/documentation/en_US/junos/topics/reference/general/syslog-facilities-severit...

KR

Adam

~~~~~~~~~~~~~~~~~~~~~~~
- Please Kudos if you found my response helpful
- Please accept my response as a 'Accepted Solution' if it solved your query