# Won't start runner: monitor ID user-center is configured for multiple monitors! IDs must be unique values

**URL:** https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961
**Category:** Beats
**Tags:** heartbeat
**Created:** [September 25, 2019, 6:02am UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961 "2019-09-25T06:02:58Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![ZMMWMY](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@ZMMWMY](https://discuss.elastic.co/u/ZMMWMY)
#### Post date: [September 25, 2019, 6:02am UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/1 "2019-09-25T06:02:58Z")

</div>

i have changed my question  
when i restart my application in k8s , i found error message in heartbeat log

```auto
won't start runner: monitor ID user-center is configured for multiple monitors! IDs must be unique values.

```

What does it mean？

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [October 1, 2019, 2:26am UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/2 "2019-10-01T02:26:00Z")

</div>

This means you've set the `id` field to the same value for two or more monitors in heartbeat. The `id` field should be unique for a given monitor.

---

<div class="post-metadata">

### Author: ![ZMMWMY](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@ZMMWMY](https://discuss.elastic.co/u/ZMMWMY)
#### Post date: [October 1, 2019, 1:36pm UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/3 "2019-10-01T13:36:07Z")

</div>

But I saw [ID definition](https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html#monitor-id) on the documentation

```auto
Note that this uniqueness is only within a given beat instance. If you want to monitor the same endpoint from multiple locations it is recommended that those heartbeat instances use the same IDs so that their results can be correlated. You can use the host.geo.name property to disambiguate them.

```

Does this mean ID can be redefined?  
thank you

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [October 1, 2019, 5:41pm UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/4 "2019-10-01T17:41:55Z")

</div>

The intent of IDs is to uniquely represent a thing that you're monitoring. You may want to monitor it from multiple locations using multiple beats, so we allow that. However, there's no reason to monitor the sang thing twice from the same beat, that would be a duplicate, so we issue the error you saw.

So, while you _can_ redefine an ID by changing the configuration associated with it, you should not. There are no controls preventing it.

---

<div class="post-metadata">

### Author: ![ZMMWMY](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@ZMMWMY](https://discuss.elastic.co/u/ZMMWMY)
#### Post date: [October 3, 2019, 4:49am UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/5 "2019-10-03T04:49:36Z")

</div>

you mean the error came from the same beat? fine  
what should i configuration the ID field for beats in k8s  
by the way i found kibana uptime does't have name options

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/2/a254d05125e79f3a6bd505c7484837b9e8c84de7.jpeg)

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [October 3, 2019, 9:34pm UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/6 "2019-10-03T21:34:48Z")

</div>

As far as what the ID should be for k8s, you have your choice of the variables here: [https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-autodiscover.html#\_kubernetes](https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-autodiscover.html#_kubernetes) . You'll want it to be unique. So, you could use `${data.kubernetes.pod.uid}-${data.kubernetes.container.name}` for instance, but there's no right answer so long as you choose something that's globally unique.

Thanks for the bug report re: missing names! We actually just fixed that, it will ship in 7.4.1. We actually are removing that name dropdown in 7.5 and handling the same use case with an enhanced query bar that autosuggests fields and values (similar to APM).

---

<div class="post-metadata">

### Author: ![ZMMWMY](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@ZMMWMY](https://discuss.elastic.co/u/ZMMWMY)
#### Post date: [October 8, 2019, 1:57am UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/7 "2019-10-08T01:57:28Z")

</div>

Sorry for the late reply  
In fact, I used `${data.kubernetes.container.name}` as a configuration it is unique  
when the application restarts the problem still occurs.  
This is my configuration

```auto
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: heartbeat-config
  namespace: monitor
  labels:
    k8s-app: heartbeat
data:
  heartbeat.yml: |-
    heartbeat.autodiscover:
      providers:
        - type: kubernetes
          host: ${NODE_NAME}
          templates:
            - condition.and:
                - equals:
                    kubernetes.namespace: "monitor"
                - not:
                    equals:
                      kubernetes.container.name: "heartbeat"
              config:
                - type: http
                  urls: ["http://${data.host}:8080/info"]
                  schedule: "@every 10s"
                  timeout: 1s
                  name: "${data.kubernetes.pod.name}"
                  id: "${data.kubernetes. container.name}"

      processors:
      - add_kubernetes_metadata:
          in_cluster: true    

   output.kafka:
      hosts: ["kafka:9092"]
      topic: 'heartbeat-dev'
      partition.round_robin:
        reachable_only: false
      required_acks: 1
      compression: gzip
      max_message_bytes: 1000000
    monitoring:
      enabled: true
      elasticsearch:
        hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
        username: ${BEAT_MONITOR_USERNAME}
        password: ${BEAT_MONITOR_PASSWORD}
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: heartbeat
  namespace: monitor
  labels:
    k8s-app: heartbeat
spec:
  template:
    metadata:
      labels:
        k8s-app: heartbeat
    spec:
      serviceAccountName: heartbeat
      terminationGracePeriodSeconds: 30
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet
      containers:
      - name: heartbeat
        image: registry-vpc.cn-hangzhou.aliyuncs.com/elasticstack/heartbeat:7.3.0
        args: [
          "-c", "/etc/heartbeat.yml",
          "-e",
        ]
        env:
        - name: ELASTICSEARCH_HOST
          value: 
        - name: ELASTICSEARCH_PORT
          value: ""
        - name: LOGSTASH_HOST
          value: 
        - name: LOGSTASH_PORT
          value: 
        - name: HEARTBEAT_USERNAME
          value:
        - name: HEARTBEAT_PASSWORD
          value: 
        - name: BEAT_MONITOR_USERNAME
          value:
        - name: BEAT_MONITOR_PASSWORD
          value:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: HOSTNAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        securityContext:
          runAsUser: 0
          # If using Red Hat OpenShift uncomment this:
          #privileged: true
        resources:
          limits:
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 100Mi
        volumeMounts:
        - name: config
          mountPath: /etc/heartbeat.yml
          readOnly: true
          subPath: heartbeat.yml
        - name: data
          mountPath: /usr/share/heartbeat/data
      volumes:
      - name: config
        configMap:
          defaultMode: 0600
          name: heartbeat-config
      # data folder stores a registry of read status for all files, so we don't send everything again on a heartbeat pod restart
      - name: data
        hostPath:
          path: /var/lib/heartbeat-data
          type: DirectoryOrCreate

```

---

<div class="post-metadata">

### Author: ![ZMMWMY](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@ZMMWMY](https://discuss.elastic.co/u/ZMMWMY)
#### Post date: [October 8, 2019, 2:17am UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/8 "2019-10-08T02:17:56Z")

</div>

Another question  
When the application is restarted, it will not only receive the heartbeat of the current application, but also receive the heartbeat from the last application ip, although it is irregular.  
What caused this? cache?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/9/293e553a4897e891b21ab21b5425160a758f6ad3.jpeg)

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [October 8, 2019, 2:30am UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/9 "2019-10-08T02:30:53Z")

</div>

If it's occurring during restart, is it possible that there momentarily are two containers using the same name? Perhaps the container ID would be more appropriate here. You could concatenate the two to create something readable, but unique for the monitor name/id.

I have a hunch thay way also fix the IP issue.

---

<div class="post-metadata">

### Author: ![ZMMWMY](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@ZMMWMY](https://discuss.elastic.co/u/ZMMWMY)
#### Post date: [October 8, 2019, 3:20am UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/10 "2019-10-08T03:20:08Z")

</div>

My mistake, it’s not a restart but a rebuild, so I think the id will be different, and I don’t see the id field in my heartbeat index

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 5, 2019, 3:20am UTC](https://discuss.elastic.co/t/wont-start-runner-monitor-id-user-center-is-configured-for-multiple-monitors-ids-must-be-unique-values/200961/11 "2019-11-05T03:20:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
