# Architecture Design For CDE

**URL:** <https://openziti.discourse.group/t/architecture-design-for-cde/1784>\
**Category:** sdk-golang\
**Created:** [November 15, 2023, 5:28pm UTC](https://openziti.discourse.group/t/architecture-design-for-cde/1784 "2023-11-15T17:28:44Z")\
**Posts on this page:** 3\
**Page:** 3

<div class="post-metadata">

**Author:** ![sam-ulrich1](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/sam-ulrich1/32/1511_2.png) [@sam-ulrich1](https://openziti.discourse.group/u/sam-ulrich1)\
**Post date:** [November 17, 2023, 3:44pm UTC](https://openziti.discourse.group/t/architecture-design-for-cde/1784/41 "2023-11-17T15:44:35Z")

</div>

Is there any API like way to get those metrics? I'd like to get ingress/egress for each service or identity so I can know if a pod has communicated in the last x time.

---

<div class="post-metadata">

**Author:** ![sam-ulrich1](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/sam-ulrich1/32/1511_2.png) [@sam-ulrich1](https://openziti.discourse.group/u/sam-ulrich1)\
**Post date:** [November 17, 2023, 3:46pm UTC](https://openziti.discourse.group/t/architecture-design-for-cde/1784/42 "2023-11-17T15:46:28Z")

</div>

Actually, I can just record that data in the agent logic I am building

---

<div class="post-metadata">

**Author:** ![plorenz](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/plorenz/32/54_2.png) [@plorenz](https://openziti.discourse.group/u/plorenz)\
**Post date:** [November 17, 2023, 5:26pm UTC](https://openziti.discourse.group/t/architecture-design-for-cde/1784/43 "2023-11-17T17:26:04Z")

</div>

Below is an example block of the event configuration. This bit you probably want is:

```auto
      - type: fabric.usage
        version: 3
        include:
          - ingress.rx
          - egress.rx

```

That generates usage events per circuit. The usage data is bucketed per-minute.

```auto
events:
  jsonLogger:
    subscriptions:
      - type: entityChange
        include:
          - services
          - identities
      - type: fabric.circuits
      - type: fabric.links
      - type: fabric.routers
      - type: fabric.terminators
      - type: metrics
        sourceFilter: .*
        metricFilter: .*
      - type: edge.sessions
      - type: edge.apiSessions
      - type: fabric.usage
        version: 3
        include:
          - ingress.rx
          - egress.rx
      - type: services
      - type: edge.entityCounts
        interval: 5s
    handler:
      type: file
      format: json
      path: /tmp/ziti-events.log
  usageLogger:
    subscriptions:
      - type: fabric.usage
        interval: 5s
    handler:
      type: amqp
      format: json
      url: "amqp://localhost:5672" 
      queue: ziti
      durable: true //default:true
      autoDelete: false //default:false
      exclusive: false //default:false
      noWait: false //default:false
      bufferSize: 50 //default:50

```

Cheers,  
Paul

[Previous page](https://openziti.discourse.group/t/architecture-design-for-cde/1784.md?page=2)
