netdata label streaming not working as expected

Hi @Raghavendra_S can you share some more details please?

Sorry, I thought the content I typed is already there, We have netdata on Linux server which will be the parent and IMX device shall be streaming the data to this Linux box , Let me explain in detail: The netdata.conf and stream.conf file of Linux box looks like this: [global]
run as user = netdata
hostname = labPC
# default storage size - increase for longer data retention
page cache size = 32
dbengine multihost disk space = 256

       host_label = labPC
       type = linux_netdata
       location = blr```
and  
stream.conf file has:                                                                                                                                         
 ```[ad1ba2b9-3b9f-4a21-87d0-bdd4866f7cbb]
    enabled = yes
    destination = 10.232.55.170
    default memory mode = dbengine```
for which we generated uuidgen on this Linux box which is in the brackets.

Now from IMX device, we have netdata.conf file:
```# NetData Configuration
# You can uncomment and change any of the options below.
# The value shown in the commented settings, is the default value.

# global netdata configuration

[global]
       debug flags = 0x10000000
       hostname = imx8mp-lpddr4-evk
       history = 86400
       config directory = /etc/netdata
       plugins directory = /usr/libexec/netdata/plugins.d
       web files directory = /usr/share/netdata/web
       cache directory = /var/cache/netdata
       log directory = /var/log/netdata
       # host access prefix =
       # memory deduplication (ksm) = yes
       # debug log = /var/log/netdata/debug.log
       # error log = /var/log/netdata/error.log
       # access log = /var/log/netdata/access.log
       # memory mode = save
       # update every = 1
       # pthread stack size = 8388608
       run as user = netdata
       # web files owner = netdata
       # http port listen backlog = 100
       port = 19999
       # ip version = any
       # disconnect idle web clients after seconds = 60
       # enable web responses gzip compression = yes
       bind to = *

[host labels]
       host_label = imx8mp-lpddr4-evk
       type = imx8
       location = blr```
.
.
.
This netdata.conf file is from yocto build and hence it is lengthy.
and  
stream.conf file has:
```[stream]
   enabled = yes
   destination = 10.232.55.170
   api key = ad1ba2b9-3b9f-4a21-87d0-bdd4866f7cbb ```

Now with this setup we are fetching metrics from these two agents in another Linux box which has prometheus. 
The prometheus.yml file has: 
```# my global config
global:
  scrape_interval: 5s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 1m # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
    - static_configs:
        - targets:
          # - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'Node_Exporter'
    scrape_interval: 5s
    static_configs:
      - targets: ['161.85.100.80:9100']

  - job_name: 'Netdata_Agent_Lab_server'
    #metrics_path: 'imx8/api/v1/allmetrics'
    metrics_path: '/api/v1/allmetrics'
    params:
      format: [prometheus_all_hosts]
    honor_labels: true
    static_configs:
        - targets: ['10.232.55.170:19999'] ```

With this prometheus, we are trying to get streamed output, which we are getting it as:
I mean when we open the prometheus/graph page, we get:

|netdata_info{application="netdata", host_label="labPC", instance="labPC", job="Netdata_Agent_Lab_server", location="blr", type="linux_netdata", version="v1.41.0-112-nightly"}|1|
| --- | --- |
|netdata_info{application="netdata", instance="imx8mp-lpddr4-evk", job="Netdata_Agent_Lab_server", version="v1.34.1"}|

as the output.  The question is the netdata stream output of the IMX device is not showing the location and type of the agent. Why? Hope the version mismatch is not an issue? The stream configuration is correct?

Hi Shyam,
Hope you got all the details of the issue, please do let me know if you need any other information. Please help in resolving this issue.

Thanks,
Raghavendra

@Raghavendra_S please format your post using code blocks for configuration - three backticks (``` ) on the lines before and after the code block. It is very hard to read as it is - please check it yourself.

@ilyam8 : Apologies, sorry for the format, now it is corrected, hope it is readable. Please check once.

With this prometheus, we are trying to get streamed output, which we are getting it as:
I mean when we open the prometheus/graph page, we get:

netdata_info{application=“netdata”, host_label=“labPC”, instance=“labPC”, job=“Netdata_Agent_Lab_server”, location=“blr”, type=“linux_netdata”, version=“v1.41.0-112-nightly”} 1
netdata_info{application=“netdata”, instance=“imx8mp-lpddr4-evk”, job=“Netdata_Agent_Lab_server”, version=“v1.34.1”}

as the output. The question is the netdata stream output of the IMX device is not showing the location and type of the agent. Why? Hope the version mismatch is not an issue? The label configuration in netdata.conf file for IMX8 is correct? Please clarify.

v1.34.1

This is an old version. Consider updating to the latest stable release.

Hi ilyam8 ,
I am able to get the stream labels of IMX device board even it is old version. I used exporting.conf for IMX as wll as Lab PC

        enabled = yes
        send configured labels = yes
        #send automatic labels = yes

[prometheus:exporter]
        send names instead of ids = yes

But how to remove the first netdata_info line which has other details? Please suggest.

Thanks for the suggestion.

That instance has send automatic labels = yes in exporting.conf

Now, all of sudden, unable to start netdata service, from error.log file: 2023-08-14 11:36:29: netdata INFO : MAIN : (0637@daemon/mai:get_system_info): NETDATA_SYSTEM_CPU_DETECTION=nproc procfs sysfs
2023-08-14 11:36:29: netdata INFO : MAIN : (0637@daemon/mai:get_system_info): NETDATA_SYSTEM_TOTAL_RAM=5884223488
2023-08-14 11:36:29: netdata INFO : MAIN : (0637@daemon/mai:get_system_info): NETDATA_SYSTEM_RAM_DETECTION=procfs
2023-08-14 11:36:29: netdata INFO : MAIN : (0637@daemon/mai:get_system_info): NETDATA_SYSTEM_TOTAL_DISK_SIZE=0
2023-08-14 11:36:29: netdata INFO : MAIN : (0637@daemon/mai:get_system_info): NETDATA_SYSTEM_DISK_DETECTION=sysfs
2023-08-14 11:36:29: netdata INFO : MAIN : (0637@daemon/mai:get_system_info): NETDATA_INSTANCE_CLOUD_TYPE=unknown
2023-08-14 11:36:29: netdata INFO : MAIN : (0637@daemon/mai:get_system_info): NETDATA_INSTANCE_CLOUD_INSTANCE_TYPE=unknown
2023-08-14 11:36:29: netdata INFO : MAIN : (0637@daemon/mai:get_system_info): NETDATA_INSTANCE_CLOUD_INSTANCE_REGION=unknown
2023-08-14 11:36:29: netdata INFO : MAIN : (0391@database/s:sql_init_databa): SQLite database /var/cache/netdata/netdata-meta.db initialization
EOF found in spawn pipe.
Shutting down spawn server event loop.
Shutting down spawn server loop complete.

From the command sudo systemctl status netdata, I am getting: Aug 14 11:34:55 imx8mp-lpddr4-evk systemd[1]: Starting Real time performance monitoring…
Aug 14 11:34:55 imx8mp-lpddr4-evk systemd[1]: Started Real time performance monitoring.
Aug 14 11:34:55 imx8mp-lpddr4-evk netdata[755]: 2023-08-14 11:34:55: netdata INFO : MAIN : CONFIG: cannot load cloud config ‘/var/lib/netdata/cloud.d/cloud.
conf’. Running with internal defaults.
Aug 14 11:34:55 imx8mp-lpddr4-evk systemd[1]: [[0;1;38;5;185m[[0;1;39m[[0;1;38;5;185mnetdata.service: Main process exited, code=killed, status=7/BUS[[0m
Aug 14 11:34:55 imx8mp-lpddr4-evk systemd[1]: [[0;1;38;5;185m[[0;1;39m[[0;1;38;5;185mnetdata.service: Failed with result ‘signal’.[[0m

How to fix this issue? I even rebooted IMX8 device once and restarted netdata n times, but in vain.