question

PorscheMe-6235 avatar image
0 Votes"
PorscheMe-6235 asked PorscheMe-6235 answered

Azure Monitor: omsconfig is not installed

We are seeing this entry in Azure Monitor Operations table. Can someone help us resolve this issue.

 omsconfig is not installed, OMS Portal configuration will not be applied and solutions such as Change Tracking and Update Assessment will not function properly. omsconfig can be installed by rerunning the omsagent installation

Below is the logs on OMS pod

 ****************End Telegraf Run in Test Mode**************************
 starting fluent-bit and setting telegraf conf file for daemonset
 since container run time is containerd update the container log fluentbit Parser to cri from docker
 nodename: *****-REDACTED-*****
 replacing nodename in telegraf config
 Telegraf 1.18.0 (git: HEAD ac5c7f6a)
 td-agent-bit 1.6.8
 stopping rsyslog...
  * Stopping enhanced syslogd rsyslogd
 2021-04-28T05:29:56Z I! Starting Telegraf 1.18.0
 2021-04-28T05:29:56Z E! [agent] Failed to connect to [outputs.socket_writer], retrying in 15s, error was 'dial tcp 0.0.0.0:25226: connect: connection refused'
    ...done.
 getting rsyslog status...
  * rsyslogd is not running
 File Doesnt Exist. Creating file...
 Fluent Bit v1.6.8
 * Copyright (C) 2019-2020 The Fluent Bit Authors
 * Copyright (C) 2015-2018 Treasure Data
 * Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
 * https://fluentbit.io



azure-monitorazure-kubernetes-service
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

shivapatpi-MSFT avatar image
0 Votes"
shivapatpi-MSFT answered PorscheMe-6235 edited

Hello @PorscheMe-6235 ,
Thanks for your query !
What is the status of OMS agent pod ? Does it goes to multiple times restarting or in crashloopback ?
Can you check if the workspace that is associated to this OMS Agent pods was deleted ?

If workspace got deleted , One of the thing which you can do is try to disable and then enable again monitoring addon, to see if a new workspace gets created and pods are back to running state.

How to Stop Monitoring Your Azure Kubernetes Service cluster - Azure Monitor | Microsoft Docs
https://docs.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-optout

“az aks disable-addons -a monitoring -n MyExistingManagedCluster -g MyExistingManagedClusterRG”

Monitor an Azure Kubernetes Service (AKS) cluster deployed - Azure Monitor | Microsoft Docs

https://docs.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-enable-existing-clusters#enable-using-azure-cli

“az aks enable-addons -a monitoring -n MyExistingManagedCluster -g MyExistingManagedClusterRG”

Let me know if that helps !

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OMS Agent pod is running without any restart

Can you check if the workspace that is associated to this OMS Agent pods was deleted ?

How do I do this?


0 Votes 0 ·

Hello @PorscheMe-6235 ,
To check your workspace , try to run the command:

az aks show -g <aksresourcegroupname> -n <aksclustername>
see the section:
"addonProfiles": {
"omsagent": {
"config": {
"logAnalyticsWorkspaceResourceID": "/subscriptions/GUID/resourcegroups/defaultresourcegroup-weu/providers/microsoft.operationalinsights/workspaces/defaultworkspace-GUID-weu"
},
"enabled": true
}
},

If it is not there, OMSAgent needs to be re-enabled :- https://docs.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-enable-existing-clusters

If the workspace was deleted recently you can try recovering using the steps mentioned below:
https://docs.microsoft.com/en-us/azure/azure-monitor/logs/delete-workspace

Can you also provide me the detailed logs for one of the OMS Agent Pod:



Regards,
Shiva.

0 Votes 0 ·
PorscheMe-6235 avatar image
0 Votes"
PorscheMe-6235 answered

Thanks @shivapatpi-MSFT for the reply.

  • Attached is the 109306-omsagent.log oms agent log

  • I checked using the command you provided, omsagent was enabled.
    "omsagent": {
    "config": {
    "logAnalyticsWorkspaceResourceID": "/subscriptions/Sub_REDACTED/resourceGroups/rg-REDACTED/providers/Microsoft.OperationalInsights/workspaces/la-REDACTED"
    },
    "enabled": true,
    "identity": {
    "clientId": "c2ca8463-2f66-4d2b-bfb3-cb2c823e957c",
    "objectId": "82f7f32e-35de-485d-b34a-7a3286aca147",
    "resourceId": "/subscriptions/Sub_REDACTED/resourcegroups/MC_rg-REDACTED_aks-REDACTED_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/omsagent-aks-REDACTED"
    }
    }






omsagent.log (35.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.