Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load grpc_check on AL2023 #2597

Open
stevengubler opened this issue Feb 4, 2025 · 0 comments
Open

Cannot load grpc_check on AL2023 #2597

stevengubler opened this issue Feb 4, 2025 · 0 comments

Comments

@stevengubler
Copy link

The grpc_check check appears to be failing to install correctly on a Amazon Linux 2023 host of mine.

Steps followed (from the docs)

  1. Installed the check on my host:
    sudo -u dd-agent datadog-agent integration install -t datadog-grpc-check==1.0.2
    
  2. Configured the check's config file (/etc/datadog-agent/conf.d/grpc_check.d/conf.yaml):
    init_config:
      service: '<REDACTED>'
    instances:
      - grpc_server_address: '<REDACTED>'
    
  3. Restarted the agent.

What I expected

I was hoping to see the check configured in datadog-agent status and health metrics in Datadog.

What happened

grpc_check was listed under loading errors with the following message.

  Loading Errors
  ==============
    grpc_check
    ----------
      Core Check Loader:
        Check grpc_check not found in Catalog

      Python Check Loader:
        unable to import module 'grpc_check': No module named 'grpc_check'

Furthermore, I ran the following to get a more detailed report on what went wrong, relevant logs included:

sudo -u dd-agent datadog-agent check --log-level DEBUG grpc_check
2025-02-03 21:57:01 UTC | CORE | DEBUG | (pkg/collector/python/loader.go:163 in Load) | Unable to load python module - datadog_checks.grpc_check: unable to import module 'datadog_checks.grpc_check': Traceback (most recent call last):
  File "/opt/datadog-agent/embedded/lib/python3.12/site-packages/datadog_checks/grpc_check/__init__.py", line 2, in <module>
    from .check import GrpcCheck
  File "/opt/datadog-agent/embedded/lib/python3.12/site-packages/datadog_checks/grpc_check/check.py", line 3, in <module>
    import grpc
ModuleNotFoundError: No module named 'grpc'
2025-02-03 21:57:01 UTC | CORE | DEBUG | (pkg/collector/python/loader.go:163 in Load) | Unable to load python module - grpc_check: unable to import module 'grpc_check': No module named 'grpc_check'
2025-02-03 21:57:01 UTC | CORE | DEBUG | (pkg/collector/python/loader.go:171 in Load) | PyLoader returning unable to import module 'grpc_check': No module named 'grpc_check' for grpc_check

Error: could not load grpc_check:
* Python Check Loader: unable to import module 'grpc_check': No module named 'grpc_check'
* Core Check Loader: Check grpc_check not found in Catalog
2025-02-03 21:57:01 UTC | CORE | ERROR | (pkg/collector/scheduler.go:213 in getChecks) | Unable to load a check from instance of config 'grpc_check': Python Check Loader: unable to import module 'grpc_check': No module named 'grpc_check'; Core Check Loader: Check grpc_check not found in Catalog

Attempted workarounds

I noticed the container installation instructions also require installing the grpcio and grpcio-health-checking Python dependencies, which lines up with the error above. I installed those on the host as dd-agent, but it made no difference. After more digging, I found this is likely because the agent has it's own embedded installation of Python.


Any help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant