Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Undocumented nginx agent docker image for kubernetes

feature-request
nginx

#1

Hi,i am trying to enable nginx third party integration in a Kubernetes cluster (Google Kubernetes Engine).

The docs are poorly documented. Can you provide a deployment example following this documentaton? https://docs.newrelic.com/docs/integrations/host-integrations/installation/container-auto-discovery

I figure out that at the top of the .yaml file i have to put my license key.


#2

Also, when I run my deployment, i have the following errors:

time="2020-01-10T12:33:10Z" level=error msg="can't get partitions" component=StorageSampler error="open /host/etc/mtab: no such file or directory"
time="2020-01-10T12:33:10Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/etc/mtab: no such file or directory" samplerName=StorageSampler
time="2020-01-10T12:33:15Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc/net/dev: no such file or directory" samplerName=NetworkSampler
time="2020-01-10T12:33:15Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="Panic in CPUMonitor.Sample: runtime error: index out of range\nStack: goroutine 169 [running]:\nruntime/debug.Stack(0xc420653bd0, 0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/debug/stack.go:24 +0xa7\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample.func1(0xc420653e00)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:42 +0x6e\npanic(0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/panic.go:491 +0x283\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample(0xc420073920, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:55 +0x4ce\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*SystemSampler).Sample(0xc4202f4700, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/system_sampler.go:86 +0xc6\ngo.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine.func1(0x111c380, 0xc4202f4700, 0xc42020ece0, 0xc4202efbc0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:37 +0x202\ncreated by go.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:27 +0x161\n" samplerName=SystemSampler
time="2020-01-10T12:33:20Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="Panic in CPUMonitor.Sample: runtime error: index out of range\nStack: goroutine 169 [running]:\nruntime/debug.Stack(0xc420653bd0, 0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/debug/stack.go:24 +0xa7\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample.func1(0xc420653e00)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:42 +0x6e\npanic(0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/panic.go:491 +0x283\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample(0xc420073920, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:55 +0x4ce\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*SystemSampler).Sample(0xc4202f4700, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/system_sampler.go:86 +0xc6\ngo.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine.func1(0x111c380, 0xc4202f4700, 0xc42020ece0, 0xc4202efbc0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:37 +0x202\ncreated by go.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:27 +0x161\n" samplerName=SystemSampler
time="2020-01-10T12:33:20Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc/net/dev: no such file or directory" samplerName=NetworkSampler
time="2020-01-10T12:33:25Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc/net/dev: no such file or directory" samplerName=NetworkSampler
time="2020-01-10T12:33:25Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="Panic in CPUMonitor.Sample: runtime error: index out of range\nStack: goroutine 169 [running]:\nruntime/debug.Stack(0xc4204cebd0, 0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/debug/stack.go:24 +0xa7\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample.func1(0xc4204cee00)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:42 +0x6e\npanic(0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/panic.go:491 +0x283\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample(0xc420073920, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:55 +0x4ce\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*SystemSampler).Sample(0xc4202f4700, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/system_sampler.go:86 +0xc6\ngo.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine.func1(0x111c380, 0xc4202f4700, 0xc42020ece0, 0xc4202efbc0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:37 +0x202\ncreated by go.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:27 +0x161\n" samplerName=SystemSampler
time="2020-01-10T12:33:30Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc: no such file or directory" samplerName=ProcessSampler
time="2020-01-10T12:33:30Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="Panic in CPUMonitor.Sample: runtime error: index out of range\nStack: goroutine 169 [running]:\nruntime/debug.Stack(0xc420577bd0, 0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/debug/stack.go:24 +0xa7\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample.func1(0xc420577e00)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:42 +0x6e\npanic(0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/panic.go:491 +0x283\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample(0xc420073920, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:55 +0x4ce\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*SystemSampler).Sample(0xc4202f4700, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/system_sampler.go:86 +0xc6\ngo.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine.func1(0x111c380, 0xc4202f4700, 0xc42020ece0, 0xc4202efbc0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:37 +0x202\ncreated by go.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:27 +0x161\n" samplerName=SystemSampler
time="2020-01-10T12:33:30Z" level=error msg="can't get partitions" component=StorageSampler error="open /host/etc/mtab: no such file or directory"
time="2020-01-10T12:33:30Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/etc/mtab: no such file or directory" samplerName=StorageSampler
time="2020-01-10T12:33:30Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc/net/dev: no such file or directory" samplerName=NetworkSampler
time="2020-01-10T12:33:30Z" level=error msg="can't open file" error="open /host/proc/sys/kernel/random/boot_id: no such file or directory" path=/host/proc/sys/kernel/random/boot_id
time="2020-01-10T12:33:35Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="Panic in CPUMonitor.Sample: runtime error: index out of range\nStack: goroutine 169 [running]:\nruntime/debug.Stack(0xc420577bd0, 0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/debug/stack.go:24 +0xa7\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample.func1(0xc420577e00)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:42 +0x6e\npanic(0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/panic.go:491 +0x283\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample(0xc420073920, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:55 +0x4ce\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*SystemSampler).Sample(0xc4202f4700, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/system_sampler.go:86 +0xc6\ngo.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine.func1(0x111c380, 0xc4202f4700, 0xc42020ece0, 0xc4202efbc0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:37 +0x202\ncreated by go.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:27 +0x161\n" samplerName=SystemSampler
time="2020-01-10T12:33:35Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc/net/dev: no such file or directory" samplerName=NetworkSampler
time="2020-01-10T12:33:40Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="Panic in CPUMonitor.Sample: runtime error: index out of range\nStack: goroutine 169 [running]:\nruntime/debug.Stack(0xc420577bd0, 0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/debug/stack.go:24 +0xa7\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample.func1(0xc420577e00)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:42 +0x6e\npanic(0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/panic.go:491 +0x283\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample(0xc420073920, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:55 +0x4ce\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*SystemSampler).Sample(0xc4202f4700, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/system_sampler.go:86 +0xc6\ngo.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine.func1(0x111c380, 0xc4202f4700, 0xc42020ece0, 0xc4202efbc0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:37 +0x202\ncreated by go.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:27 +0x161\n" samplerName=SystemSampler
time="2020-01-10T12:33:40Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc/net/dev: no such file or directory" samplerName=NetworkSampler
time="2020-01-10T12:33:45Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc/net/dev: no such file or directory" samplerName=NetworkSampler
time="2020-01-10T12:33:45Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="Panic in CPUMonitor.Sample: runtime error: index out of range\nStack: goroutine 169 [running]:\nruntime/debug.Stack(0xc420577bd0, 0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/debug/stack.go:24 +0xa7\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample.func1(0xc420577e00)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:42 +0x6e\npanic(0xb90de0, 0x1149cc0)\n\t/usr/local/go1.9/src/runtime/panic.go:491 +0x283\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*CPUMonitor).Sample(0xc420073920, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/cpu.go:55 +0x4ce\ngo.datanerd.us/p/meatballs/infra-agent/metrics.(*SystemSampler).Sample(0xc4202f4700, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/system_sampler.go:86 +0xc6\ngo.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine.func1(0x111c380, 0xc4202f4700, 0xc42020ece0, 0xc4202efbc0)\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:37 +0x202\ncreated by go.datanerd.us/p/meatballs/infra-agent/metrics/sender.StartSamplerRoutine\n\t/tmp/tmp.q3bZB9VoKe/src/go.datanerd.us/p/meatballs/infra-agent/metrics/sender/sampler_routine.go:27 +0x161\n" samplerName=SystemSampler
time="2020-01-10T12:33:50Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc: no such file or directory" samplerName=ProcessSampler
time="2020-01-10T12:33:50Z" level=error msg="can't get sample from sampler" component="Metrics Sender" error="open /host/proc/net/dev: no such file or directory" samplerName=NetworkSampler```

#3

Here you are my new-relic-infra.yaml:

license_key: euMYLICENSE
integration_name: com.newrelic.nginx
discovery:
  docker:
    match:
      image: nginx
instances:
  - name: monitoring-all
    command: metrics
    arguments:
      status_url: http://${discovery.ip}:${discovery.port}/status
      status_module: discover
      remote_monitoring: true
    labels:
      env: ${discovery.label.env}
      role: ${discovery.label.role}

#4

Also, the new relic nginx agent does not work well because it requires systemd


#5

Here you are the output from diagnosis tool:


Check Results
-------------------------------------------------

Info     Base/Env/CollectEnvVars [Gathered Environment variables of current shell.] 
Failure  Base/Config/Collect
Error    Base/Env/InitSystem
Success  Base/Config/LicenseKey
Info     Base/Config/RegionDetect [1 unique New Relic region(s) detected from config.] 
Info     Base/Env/HostInfo [app-7d9cbd8dc-9bxbf] 
Failure  Base/Log/Copy
Success  Base/Collector/ConnectEU
Warning  Java/AppServer/WebSphere
67 results not shown: 67 None
See nrdiag-output.json for full results.

Issues Found
-------------------------------------------------
Failure - Base/Config/Collect
Config files not found, please check to ensure you are running this from your project's working directory or specify config file location with -c option
See https://docs.newrelic.com/docs/agents/manage-apm-agents/configuration/configure-agent for more information.


Error - Base/Env/InitSystem
Unable to parse init system from: /bin/busybox


Failure - Base/Log/Copy
Log File not found, please check working directory
See https://docs.newrelic.com/docs/new-relic-diagnostics#run-diagnostics for more information.


Warning - Java/AppServer/WebSphere
We suspect this is a WebSphere environment but we're unable to determine the version. Supported status is unknown.
See https://docs.newrelic.com/docs/agents/java-agent/additional-installation/ibm-websphere-application-server for more information.

#6

Hello!

The nginx integration is designed to be run from a host environment, not in a container. The image you found is for possible future work and isn’t a part of our supported products. I would recommend running the Infra agent and integration on a host that targets your nginx environment.


#7

Okey, thanks for your suport!


#8

Hi @oswald_development ,
Thanks for taking the time to write here!
We have an early access program for running this NGinx integration in Kubernetes, contact me in a private message if you would like to try it.