Forum Discussion
In search of STABLE DB variable to use for determining if a change has been made
this might not what you are looking for but wonder if sync-status rest api is useful.
e.g.
[root@bip1a:Active:In Sync] config curl -sk -u admin:admin https://localhost/mgmt/tm/cm/sync-status |jq '.entries."https://localhost/mgmt/tm/cm/sync-status/0".nestedStats.entries.status.description'
"In Sync"
Thank you for your response. Unfortunately, that's not what I'm looking for.
My code pulls the DB variable value and compares it to a file called $f5host.lastmod, which contains the variable value returned the last time a change/sync was done. Like this (in perl):
sub modcheck {
my $lasttimeshitchanged = read_file("/var/f5backup/$f5host.lastmod");
$bigip->GET("sys/db/configsync.localconfigtime");
$jresponse = decode_json $bigip->responseContent();
my $checkvalue = $jresponse->{"value"};
if ( $checkvalue > $lasttimeshitchanged ) {
$shitchanged = 1;
write_file("/var/f5backup/$f5host.lastmod",$checkvalue);
}
}
Any time a device-group runs a sync operation, whether automatic or manual, that variable changes. After running checks, the APM module seems to not have an issue, but ASM keeps running an automatic sync which de-stabilizes that variable. I could use ltm.configtime, which is stable on the ASMs, but that wouldn't tell me if an ASM change had occurred, only an LTM change. I can write code to recognize when the ASM module is provisioned and check multiple variables, but I haven't been able to find a matching variable (ex. asm.configtime doesn't exist) that tells me the last time a change was made to the ASM module.
Any ideas?
Sincere thanks in advance.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com