# Elastic-agent cannot configure filebeat error "failed for nwparser.icmp\_code"

**URL:** https://discuss.elastic.co/t/elastic-agent-cannot-configure-filebeat-error-failed-for-nwparser-icmp-code/308603
**Category:** Beats
**Tags:** fleet, filebeat
**Created:** [June 30, 2022, 3:39pm UTC](https://discuss.elastic.co/t/elastic-agent-cannot-configure-filebeat-error-failed-for-nwparser-icmp-code/308603 "2022-06-30T15:39:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)
#### Post date: [June 30, 2022, 3:39pm UTC](https://discuss.elastic.co/t/elastic-agent-cannot-configure-filebeat-error-failed-for-nwparser-icmp-code/308603/1 "2022-06-30T15:39:17Z")

</div>

The Elastic Agent that I have assigned to my Fleet server policy cannot configure it's Filebeat instance.

This is version 8.2.3 on Ubuntu 18.04.

`elastic-agent status` gives me:

```auto
Status: FAILED
Message: (no message)
Applications:
  * fleet-server (HEALTHY)
                  Running on policy with Fleet Server integration: b647fff0-c58b-11eb-91dd-136c7f4a9d5f
  * filebeat (FAILED)
                  1 error occurred:
                  * 2 errors: Error creating runner from config: failed in processor.javascript: failed in test() function: failed for nwparser.icmp_code: expected:'1' got:'null' at inline.js:2502:19(25); Error creating runner from config: failed in processor.javascript: failed in test() function: failed for nwparser.icmp_code: expected:'1' got:'null' at inline.js:2502:19(25)

  * metricbeat (HEALTHY)
                           Running
  * filebeat_monitoring (HEALTHY)
                           Running
  * metricbeat_monitoring (HEALTHY)
                           Running

```

I spent a good while searching for answers and couldn't find any.

I also tried reinstalling the agent from scratch. I even removed all integrations from the policy except the fleet server integration.

I have other 8.2.3 agents running just fine on other servers. So I don't think it's a bug...

Anyone have any ideas?

---

<div class="post-metadata">

### Author: ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)
#### Post date: [July 4, 2022, 12:14pm UTC](https://discuss.elastic.co/t/elastic-agent-cannot-configure-filebeat-error-failed-for-nwparser-icmp-code/308603/2 "2022-07-04T12:14:41Z")

</div>

> [@jerrac](#):
>
> I also tried reinstalling the agent from scratch. I even removed all integrations from the policy except the fleet server integration.

This is interesting because I think that the fleet server integration doesn't use any javascript processor.

Can you check what configuration is being used by this node, with `elastic-agent inspect`?

---

<div class="post-metadata">

### Author: ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)
#### Post date: [July 5, 2022, 4:20pm UTC](https://discuss.elastic.co/t/elastic-agent-cannot-configure-filebeat-error-failed-for-nwparser-icmp-code/308603/3 "2022-07-05T16:20:31Z")

</div>

Well, that's a lot of output... 4300+ lines...

And it looks like the agent is still trying to use integrations I removed from the policy.

I see all of these in there:

- apache
- fortinet
- system
- a custom log pointed at my postfix logs
- auditd
- fleet server

The string "nwparser.icmp\_code" shows up in the fortinet config...

How do I get the agent to drop that old config?

---

<div class="post-metadata">

### Author: ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)
#### Post date: [July 5, 2022, 4:57pm UTC](https://discuss.elastic.co/t/elastic-agent-cannot-configure-filebeat-error-failed-for-nwparser-icmp-code/308603/4 "2022-07-05T16:57:29Z")

</div>

Looks like moving `/opt/Elastic/Agent/data/elastic-agent-< random chars >/state.yml` away and restarting fixed it. 🙂 Well, after I fixed some other misconfiguration.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 2, 2022, 6:58pm UTC](https://discuss.elastic.co/t/elastic-agent-cannot-configure-filebeat-error-failed-for-nwparser-icmp-code/308603/5 "2022-08-02T18:58:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
