# udp handler not working

**URL:** <https://discourse.sensu.io/t/udp-handler-not-working/74>\
**Category:** Sensu Classic (EOL)\
**Created:** [September 11, 2013, 2:56pm UTC](https://discourse.sensu.io/t/udp-handler-not-working/74 "2013-09-11T14:56:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Lalor](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@Brian\_Lalor](https://discourse.sensu.io/u/Brian_Lalor)\
**Post date:** [September 11, 2013, 2:56pm UTC](https://discourse.sensu.io/t/udp-handler-not-working/74/1 "2013-09-11T14:56:52Z")

</div>

I’m struggling to get the UDP handler working. Sensu version 0.10.2. had it working fine on a Vagrant VM, but now that I’m trying things in my dev environment, it’s not working. Although Sensu says it’s handling the event, I’m not observing any network traffic (via tcpdump), and no errors in the log.

I see this in sensu-server when it handles an event:

{“timestamp”:“2013-09-11T14:44:37.201342+0000”,“level”:“info”,“message”:“handling event”,“event”:{“client”:{“subscriptions”:[“kibana”,“default”,“logstash\_server”],“address”:“10.252.2.195”,“tags”:[“app:pi-logstash”,“ver:LATEST”,“az:usw2a”,“env:dev”],“safe\_mode”:false,“name”:“usw2a-pri-dev-pi-logstash-latest-01”,“timestamp”:1378910680},“check”:{“interval”:60,“command”:"/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -C 1 -p ‘logstash-server’",“handlers”:[“default”],“subscribers”:[“logstash\_server”],“standalone”:false,“name”:“logstash\_server-running”,“issued”:1378910676,“executed”:1378910696,“output”:“CheckProcs CRITICAL: Found 2 matching processes; cmd /logstash-server/\n”,“status”:2,“duration”:0.918,“history”:[“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”]},“occurrences”:22,“action”:“create”},“handler”:{“severities”:[“ok”,“warning”,“critical”,“unknown”],“type”:“udp”,“socket”:{“host”:“10.252.2.195”,“port”:4242},“name”:“default”}}

This is the config for my “default” handler:

{

“handlers”: {

“default”: {

“severities”: [

“ok”,

“warning”,

“critical”,

“unknown”

],

“type”: “udp”,

“socket”: {

“host”: “10.252.2.195”,

“port”: 4242

}

}

}

}

If I use nc to send the event, it is received (by logstash at the other end), and I see traffic with tcpdump:

echo ‘{“client”: {“subscriptions”: [“kibana”, “default”, “logstash\_server”], “address”: “10.252.2.195”, “tags”: [“app:pi-logstash”, “ver:LATEST”, “az:usw2a”, “env:dev”], “safe\_mode”: false, “name”: “usw2a-pri-dev-pi-logstash-latest-01”, “timestamp”: 1378909379 }, “check”: {“interval”: 60, “command”: “/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -C 1 -p ‘logstash-server’”, “handlers”: [“default”], “subscribers”: [“logstash\_server”], “standalone”: false, “name”: “logstash\_server-running”, “issued”: 1378909360, “executed”: 1378909381, “output”: “CheckProcs CRITICAL: Found 2 matching processes; cmd /logstash-server/\n”, “status”: 2, “duration”: 0.493, “history”: [“2”, “2”, “2”, “2”, “2”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “2”] }, “occurrences”: 1, “action”: “create”}’ | nc -u -q 1 10.252.2.195 4242

Thoughts?

> **···**
>
> –  
> Brian Lalor  
> [blalor@bravo5.org](mailto:blalor@bravo5.org)
> 
> > **[blalor - Overview](https://github.com/blalor)**
> >
> > Just zis guy, you know? blalor has 112 repositories available. Follow their code on GitHub.

---

<div class="post-metadata">

**Author:** ![Sean\_Porter](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@Sean\_Porter](https://discourse.sensu.io/u/Sean_Porter)\
**Post date:** [September 17, 2013, 4:40pm UTC](https://discourse.sensu.io/t/udp-handler-not-working/74/2 "2013-09-17T16:40:53Z")

</div>

Hey Brian,

The UDP handler has been fixed in the latest beta (0.11.0.beta.2), now binds to [0.0.0.0:0](http://0.0.0.0:0). Once the latest beta has a few more testers, we can publish a new stable.

Sean.

> **···**
>
> On Wed, Sep 11, 2013 at 7:56 AM, Brian Lalor [blalor@bravo5.org](mailto:blalor@bravo5.org) wrote:
> 
> > I’m struggling to get the UDP handler working. Sensu version 0.10.2. had it working fine on a Vagrant VM, but now that I’m trying things in my dev environment, it’s not working. Although Sensu says it’s handling the event, I’m not observing any network traffic (via tcpdump), and no errors in the log.
> 
> > I see this in sensu-server when it handles an event:
> 
> > 
> 
> > {“timestamp”:“2013-09-11T14:44:37.201342+0000”,“level”:“info”,“message”:“handling event”,“event”:{“client”:{“subscriptions”:[“kibana”,“default”,“logstash\_server”],“address”:“10.252.2.195”,“tags”:[“app:pi-logstash”,“ver:LATEST”,“az:usw2a”,“env:dev”],“safe\_mode”:false,“name”:“usw2a-pri-dev-pi-logstash-latest-01”,“timestamp”:1378910680},“check”:{“interval”:60,“command”:“/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -C 1 -p ‘logstash-server’”,“handlers”:[“default”],“subscribers”:[“logstash\_server”],“standalone”:false,“name”:“logstash\_server-running”,“issued”:1378910676,“executed”:1378910696,“output”:“CheckProcs CRITICAL: Found 2 matching processes; cmd /logstash-server/\n”,“status”:2,“duration”:0.918,“history”:[“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”,“2”]},“occurrences”:22,“action”:“create”},“handler”:{“severities”:[“ok”,“warning”,“critical”,“unknown”],“type”:“udp”,“socket”:{“host”:“10.252.2.195”,“port”:4242},“name”:“default”}}
> 
> > 
> 
> > This is the config for my “default” handler:
> 
> > 
> 
> > {
> 
> > “handlers”: {
> 
> > “default”: {
> 
> > “severities”: [
> 
> > “ok”,
> 
> > “warning”,
> 
> > “critical”,
> 
> > “unknown”
> 
> > ],
> 
> > “type”: “udp”,
> 
> > “socket”: {
> 
> > “host”: “10.252.2.195”,
> 
> > “port”: 4242
> 
> > }
> 
> > }
> 
> > }
> 
> > }
> 
> > 
> 
> > If I use nc to send the event, it is received (by logstash at the other end), and I see traffic with tcpdump:
> 
> > 
> 
> > echo ‘{“client”: {“subscriptions”: [“kibana”, “default”, “logstash\_server”], “address”: “10.252.2.195”, “tags”: [“app:pi-logstash”, “ver:LATEST”, “az:usw2a”, “env:dev”], “safe\_mode”: false, “name”: “usw2a-pri-dev-pi-logstash-latest-01”, “timestamp”: 1378909379 }, “check”: {“interval”: 60, “command”: “/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -C 1 -p ‘logstash-server’”, “handlers”: [“default”], “subscribers”: [“logstash\_server”], “standalone”: false, “name”: “logstash\_server-running”, “issued”: 1378909360, “executed”: 1378909381, “output”: “CheckProcs CRITICAL: Found 2 matching processes; cmd /logstash-server/\n”, “status”: 2, “duration”: 0.493, “history”: [“2”, “2”, “2”, “2”, “2”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “0”, “2”] }, “occurrences”: 1, “action”: “create”}’ | nc -u -q 1 10.252.2.195 4242
> 
> > 
> 
> > Thoughts?
> 
> > –  
> > Brian Lalor  
> > [blalor@bravo5.org](mailto:blalor@bravo5.org)  
> > [http://github.com/blalor](http://github.com/blalor)
> 
> >

---

<div class="post-metadata">

**Author:** ![Brian\_Lalor](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@Brian\_Lalor](https://discourse.sensu.io/u/Brian_Lalor)\
**Post date:** [September 17, 2013, 4:44pm UTC](https://discourse.sensu.io/t/udp-handler-not-working/74/3 "2013-09-17T16:44:04Z")

</div>

Thanks, Sean.

> **···**
>
> On Sep 17, 2013, at 12:40 PM, Sean Porter [portertech@gmail.com](mailto:portertech@gmail.com) wrote:
> 
> > The UDP handler has been fixed in the latest beta (0.11.0.beta.2), now binds to [0.0.0.0:0](http://0.0.0.0:0/). Once the latest beta has a few more testers, we can publish a new stable.
> 
> –  
> Brian Lalor  
> [blalor@bravo5.org](mailto:blalor@bravo5.org)
> 
> > **[blalor - Overview](https://github.com/blalor)**
> >
> > Just zis guy, you know? blalor has 125 repositories available. Follow their code on GitHub.

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [November 22, 2018, 2:04am UTC](https://discourse.sensu.io/t/udp-handler-not-working/74/4 "2018-11-22T02:04:58Z")

</div>


