name: PlaygroundPrometheus
services:
  monitoring:
    name: monitoring
    type: Namespace
    apiVersion: v1
    version: v1.25.2
    model: kubernetes
    traits:
      meshmap:
        edges: []
        id: 490cc181-6441-4009-b60c-29e62fbd1ecb
        label: monitoring
        meshmodel-data:
          category:
            metadata: null
            name: Orchestration & Management
          displayName: Kubernetes
          metadata:
            svgColor: ui/public/static/img/meshmodels/kubernetes/color/apiservice-color.svg
            svgWhite: ui/public/static/img/meshmodels/kubernetes/white/apiservice-white.svg
          name: kubernetes
          version: v1.25.2
        meshmodel-metadata:
          genealogy: parent
          isCustomResource: false
          isNamespaced: false
          logoURL: https://github.com/cncf/artwork/blob/master/projects/kubernetes/icon/white/kubernetes-icon-white.svg
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: rectangle
          styleOverrides: '{"background-image":"none","border-width":2,"border-style":"dashed","background-opacity":0.5}'
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/namespace-color.svg
          svgComplete: ui/public/static/img/meshmodels/kubernetes/complete/namespace-complete.svg
          svgWhite: ui/public/static/img/meshmodels/kubernetes/color/namespace-color.svg
        position:
          posX: -22.784801746944055
          posY: -8.01825179199595
  prometheus-config:
    name: prometheus-config
    type: ConfigMap
    apiVersion: v1
    model: kubernetes
    dependsOn:
    - monitoring
    settings:
      data:
        prometheus.yml: |
          global:
            scrape_interval:     15s
            evaluation_interval: 15s
          alerting:
            alertmanagers:
            - static_configs:
              - targets:
          rule_files:
            # - "example-file.yml"
          scrape_configs:
            - job_name: 'prometheus'
              static_configs:
              - targets: ['147.75.47.9:9100','147.28.149.165:9100']
            - job_name: 'k8services'
              kubernetes_sd_configs:
                  - role: endpoints
              relabel_configs:
                  - source_labels:
                      - __meta_kubernetes_namespace
                      - __meta_kubernetes_service_name
                    action: drop
                    regex: default;kubernetes
                  - source_labels:
                      - __meta_kubernetes_namespace
                    regex: default
                    action: keep
                  - source_labels: [__meta_kubernetes_service_name]
                    target_label: job
    traits:
      meshmap:
        edges: []
        id: 5838be4a-ad89-46d6-921f-0ac2ab600167
        label: prometheus-config
        meshmodel-metadata:
          genealogy: ""
          isCustomResource: false
          isNamespaced: true
          logoURL: https://github.com/cncf/artwork/blob/master/projects/kubernetes/icon/white/kubernetes-icon-white.svg
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: circle
          styleOverrides: ""
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/apiservice-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kubernetes/white/apiservice-white.svg
        parent: 490cc181-6441-4009-b60c-29e62fbd1ecb
        position:
          posX: 47.34485976803421
          posY: -13.491416667146751
  prometheus-deployment:
    name: prometheus-deployment
    type: Deployment
    apiVersion: apps/v1
    namespace: default
    model: kubernetes
    dependsOn:
    - monitoring
    settings:
      spec:
        replicas: 1
        selector:
          match Labels:
            app: prometheus-server
        strategy:
          rolling Update:
            max Surge: 1
            max Unavailable: 1
          type: RollingUpdate
        template:
          metadata:
            labels:
              app: prometheus-server
          spec:
            containers:
            - args:
              - --config.file=/etc/prometheus/prometheus.yml
              - --storage.tsdb.path=/prometheus/
              image: prom/prometheus:v2.2.1
              name: prometheus
              ports:
              - container Port: 9090
              volume Mounts:
              - mount Path: /etc/prometheus/
                name: prometheus-config-volume
              - mount Path: /prometheus/
                name: prometheus-storage-volume
            volumes:
            - config Map:
                default Mode: 420
                name: prometheus-config
              name: prometheus-config-volume
            - name: prometheus-storage-volume
    traits:
      meshmap:
        edges:
        - data:
            id: 9b0fd695-51ef-4004-9a58-d655e85a8836
            metadata:
              port: 8080
              protocol: TCP
            source: 548cc023-4074-452d-a034-903adad8f3e7
            subType: Network
            target: e74ee854-90b1-4b19-884c-6296574a2e60
        id: e74ee854-90b1-4b19-884c-6296574a2e60
        label: prometheus-deployment
        meshmodel-metadata:
          genealogy: parent
          isCustomResource: false
          isNamespaced: true
          logoURL: Created by Lee
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: round-pentagon
          styleOverrides: '{"background-image":"none","border-width":2,"background-opacity":0.5}'
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/deployment-color.svg
          svgComplete: ui/public/static/img/meshmodels/kubernetes/complete/deployment-complete.svg
          svgWhite: ui/public/static/img/meshmodels/kubernetes/color/deployment-color.svg
        parent: 490cc181-6441-4009-b60c-29e62fbd1ecb
        position:
          posX: -14.34377464174484
          posY: -16.874013440689865
  prometheus-dkkvc:
    name: prometheus-dkkvc
    type: ClusterRoleBinding
    apiVersion: rbac.authorization.k8s.io/v1
    model: kubernetes
    settings:
      role Ref:
        api Group: rbac.authorization.k8s.io
        kind: ClusterRole
        name: prometheus
      subjects:
      - kind: ServiceAccount
        name: default
        namespace: monitoring
    traits:
      meshmap:
        edges: []
        id: 8f94e01d-8fdb-4bb9-94bf-2936efc6479a
        label: prometheus
        meshmodel-metadata:
          genealogy: ""
          isCustomResource: false
          isNamespaced: false
          logoURL: Created by Lee
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: round-rectangle
          styleOverrides: '{"height":"22px","width":"16px","padding":"6px", "z-index":9999}'
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/clusterrolebinding-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kubernetes/white/clusterrolebinding-white.svg
        position:
          posX: 111.21601209777306
          posY: 24.32498028660414
  prometheus-lprcf:
    name: prometheus-lprcf
    type: ClusterRole
    apiVersion: rbac.authorization.k8s.io/v1
    model: kubernetes
    settings:
      rules:
      - api Groups:
        - ""
        non Resource URLs:
        - ""
        resources:
        - nodes
        - nodes/proxy
        - services
        - endpoints
        - pods
        verbs:
        - get
        - list
        - watch
      - api Groups:
        - extensions
        resources:
        - ingresses
        verbs:
        - get
        - list
        - watch
      - non Resource URLs:
        - /metrics
        verbs:
        - get
    traits:
      meshmap:
        edges: []
        id: 7574c6e8-9345-48eb-a2a5-7cc3aa0ef7a4
        label: prometheus
        meshmodel-metadata:
          genealogy: ""
          isCustomResource: false
          isNamespaced: false
          logoURL: Created by Lee
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: round-rectangle
          styleOverrides: '{"height":"22px","width":"16px","padding":"6px"}'
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/clusterrole-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kubernetes/white/clusterrole-white.svg
        position:
          posX: 108.17842338749166
          posY: -32.399615144022164
  prometheus-service:
    name: prometheus-service
    type: Service
    apiVersion: v1
    model: kubernetes
    dependsOn:
    - monitoring
    settings:
      spec:
        ports:
        - port: 8080
          protocol: TCP
          target Port: 9090
        selector:
          app: prometheus-server
        type: NodePort
    traits:
      meshmap:
        edges:
        - data:
            id: 9b0fd695-51ef-4004-9a58-d655e85a8836
            metadata:
              port: 8080
              protocol: TCP
            source: 548cc023-4074-452d-a034-903adad8f3e7
            subType: Network
            target: e74ee854-90b1-4b19-884c-6296574a2e60
        id: 548cc023-4074-452d-a034-903adad8f3e7
        label: prometheus-service
        meshmodel-metadata:
          genealogy: ""
          isCustomResource: false
          isNamespaced: true
          logoURL: https://github.com/cncf/artwork/blob/master/projects/kubernetes/icon/white/kubernetes-icon-white.svg
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: round-triangle
          styleOverrides: '{"height":16,"width":17,"padding":12,"background-fit":"none","background-position-y":4}'
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/apiservice-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kubernetes/white/apiservice-white.svg
        parent: 490cc181-6441-4009-b60c-29e62fbd1ecb
        position:
          posX: -92.91446326192232
          posY: -17.01825179199595
