cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
2263
Views
0
Helpful
1
Replies

APIC, List of faults, filtered by date and time

Dirk Feldhaus
Level 1
Level 1

Hello,

when implementing configuration with a script or Ansible on an APIC I'd like to check if any new faults have been created. The easiest way I can think of is to get a list of faults that have been created within the last 10 minutes or so. But I can't figure out what the REST call looks like.

So far I can get a list of faults, sorted by time and even filtered for some attributes. But I can't filter by the created attribute. 

That's what I have so far:

https://my-apic-ip/api/class/faultInst.json?query-target=self&order-by=faultInst.created|desc&query-target-filter=eq(faultInst.cause,"resolution-failed")

Returns a list of faults ordered by the attribute "created" and filtered for "cause = resolution-failed". 

However if I want to filter for the attribute "created", e.g.

https://my-apic-ip/api/class/faultInst.json?query-target=self&order-by=faultInst.created|desc&query-target-filter=eq(faultInst.created,"2018-03-09T12:37:55.188+02:00")

I get the error message:

"Incorrect filter format for faultInst.created, value '2018-03-09T12:37:55.188 02:00' is not valid"

 

Does anyone have an idea how to filter by time and date or how to check if the config implementation caused any problems?

1 Reply 1

Dirk Feldhaus
Level 1
Level 1
Okay, I figured it out. IT is using epoch seconds, what a surprise :-)

Save 25% on Day-2 Operations Add-On License