Forum Discussion

Michaelyang's avatar
Michaelyang
Icon for Cirrostratus rankCirrostratus
Nov 30, 2022
Solved

When sync status change show in log

Hello,

Is it possible for F5 to show up "sync status change"in the log when the sync status changes?
I tried to change the sync status and found that the information is not shown in the log.

Any help is appreciate.

  • Hi Michael,

    I'm uncertain if a more agressive MCPD log level may include some log messages for sync-status-changes? You may give it a try...

    If everything fails you could simply produce your own log lines as needed via custom iCall scripts. The quickly coded iCall script executes every 120 seconds a "tmsh show cm sync-status" and then checks if the resulting text output contains the string "Color green",  if the string is not present, it will simply create a log entry for you...

     

    sys icall handler periodic check_config_sync {
        interval 120
        script check_config_sync
    }
    
    sys icall script check_config_sync {
       app-service none
       definition {
    		tmsh::log_dest file
    		tmsh::log_level debug
    		if { [tmsh::show /cm sync-status] contains "Color    green" } then {
    			# Everything is fine... 	
    		} else {
    			tmsh::log debug "Check Config Sync: [info hostname] displays a non-green sync-state."
    		}
       }
       description none
       events none
    }

     

    Cheers, Kai

8 Replies

  • Hi Michael,

    I'm uncertain if a more agressive MCPD log level may include some log messages for sync-status-changes? You may give it a try...

    If everything fails you could simply produce your own log lines as needed via custom iCall scripts. The quickly coded iCall script executes every 120 seconds a "tmsh show cm sync-status" and then checks if the resulting text output contains the string "Color green",  if the string is not present, it will simply create a log entry for you...

     

    sys icall handler periodic check_config_sync {
        interval 120
        script check_config_sync
    }
    
    sys icall script check_config_sync {
       app-service none
       definition {
    		tmsh::log_dest file
    		tmsh::log_level debug
    		if { [tmsh::show /cm sync-status] contains "Color    green" } then {
    			# Everything is fine... 	
    		} else {
    			tmsh::log debug "Check Config Sync: [info hostname] displays a non-green sync-state."
    		}
       }
       description none
       events none
    }

     

    Cheers, Kai

    • Hello Kai_Wilke , 
      I wonder if configsync.autodetect still supported. 
      I think if he modified " db configsync.autodetect" value to be enabled , I think he will get an informative log message within /var/log/ltm. 

      I tried to test it on my lab but i do not find this option. 

      • Kai_Wilke's avatar
        Kai_Wilke
        Icon for MVP rankMVP

        Hi Mohamed,

        beginning with TMOS v11 the cluster management has completely changed.

        I highly doubt that any of those cluster related KB information written for previous TMOS versions still apply. It was a completely different world back then...

        Cheers, Kai

    • Michaelyang's avatar
      Michaelyang
      Icon for Cirrostratus rankCirrostratus

      Hi Mohamed_Ahmed_Kansoh,

      Thanks for your reply.

      Maybe my expression was not clear and made you misunderstand.
      I mean when the sync status changes, can I see the log with the status change on var/log/ltm?

      I tried to change the sync status and found that the information is not shown in var/log/ltm.

      • hello , 
        you can see the " Sync " action in "/var/log/ltm" , you see a log related to mcpd process contains the commit id , time , ..etc , but this when you click sync button. 

        I do not know if the status changed to " changes pending " shoud give you a log or not. 
        let us see one of F5 experts here can provide you a good reply in this. 

        But I want to ask you , why do you want to see this log , it wouldn’t be useful for anything , you can see the status cleared within cli or GUI as well. 

        Regards