yesterday
I have a script that we using the finger print MAC's and add to a group with a time stamp. The idea was that it would age these MAC's out after 90 days but it doesn't seem to be doing that. Does anyone know of a script I can add to the workflow to look at the time stamp and remove from the group or should I start trying to write one? Script is below. Thank in advance!
# XMC 8.3 Workflow
# written by: Zdenek Pala
# date: 9th September 2019
# purpose: Add ES to ES group
from xmclib import logger
from xmclib import emc_vars
########LOGGING - FUNCTION DEFINITIONS
def wf_error(log):
print 'Error:' +log
logger.error(log)
def wf_info(log):
print 'INFO:' +log
logger.info(log)
# call API
varQuery = '''mutation{accessControl{addMACToEndSystemGroup(input:{group:"%s",description:"TimeStamp: %s",value:"%s",removeFromOtherGroups:false,reauthenticate:false}){status,message}}}''' %(emc_vars["ESgroup"],emc_vars["lastSeenTimeL"]+"="+emc_vars["lastSeenTime"],emc_vars["macAddress"])
try:
varResult = emc_nbi.query(varQuery)['accessControl']['addMACToEndSystemGroup']
if varResult['status'] != "SUCCESS":
wf_info("Failed the NBI call. Query: %s, response: %s" %(varQuery,varResult['message']))
else:
wf_info("Added %s" %emc_vars["macAddress"])
except:
wf_error("Exception! query %s" %varQuery)
#################
## Be Extreme! ##
#################
Solved! Go to Solution.
21 hours ago
If that mac address does not authenticate anymore the data retention of XIQ Site Engine would cleanup these mac addresses after 90 days, and also remove them from groups if that option is checked in Administration/Options/Accesss Control/Data Persistence.
14 hours ago
It was the administrative option not set. Thank you!!!
21 hours ago
If that mac address does not authenticate anymore the data retention of XIQ Site Engine would cleanup these mac addresses after 90 days, and also remove them from groups if that option is checked in Administration/Options/Accesss Control/Data Persistence.