DRuggeri / netgear_exporter

A Prometheus exporter for Netgear consumer routers
Other
30 stars 6 forks source link

Error while collecting traffic statistics: XML syntax error #16

Open elalexluna83 opened 1 year ago

elalexluna83 commented 1 year ago
# podman run -d --name my-netgear --restart=always --ip 10.88.0.9 \
    -e NETGEAR_EXPORTER_URL="https://192.168.100.1" \
    -e NETGEAR_EXPORTER_USERNAME="admin" \
    -e NETGEAR_EXPORTER_PASSWORD="XXXXXXXXXX" \
    -e NETGEAR_EXPORTER_INSECURE="true" \
    -e NETGEAR_EXPORTER_CLIENT_DEBUG="true" \
    docker.io/druggeri/netgear_exporter
# podman logs 6b7efe4c20ee
time="2023-07-27T20:12:22Z" level=info msg="Starting node_exporter 2.0.3" source="netgear_exporter.go:180"
2023/07/27 20:12:22 netgear_client.go: Constructing debug client
time="2023-07-27T20:12:22Z" level=info msg="Listening on :9192" source="netgear_exporter.go:230"
2023/07/27 20:12:52 netgear_client.go: full url (derived)='https://192.168.100.1/soap/server_sa/', data='<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope
  xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
  xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
    <SessionID>A7D88AE69687E58D9A00</SessionID>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <M1:GetAttachDevice xsi:nil="true" />
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>'
2023/07/27 20:12:52 netgear_client.go: full url (derived)='https://192.168.100.1/soap/server_sa/', data='<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope
  xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
  xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
    <SessionID>A7D88AE69687E58D9A00</SessionID>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <M1:GetSystemInfo xsi:nil="true" />
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>'
2023/07/27 20:12:52 netgear_client.go: full url (derived)='https://192.168.100.1/soap/server_sa/', data='<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope
  xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
  xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
    <SessionID>A7D88AE69687E58D9A00</SessionID>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <M1:GetTrafficMeterStatistics xmlns:M1="urn:NETGEAR-ROUTER:service:DeviceConfig:1">
    </M1:GetTrafficMeterStatistics>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>'
2023/07/27 20:12:52 netgear_client.go: Sending HTTP request to https://192.168.100.1/soap/server_sa/...
2023/07/27 20:12:52 netgear_client.go: Request headers:
2023/07/27 20:12:52 netgear_client.go:   Content-Length: 498
2023/07/27 20:12:52 netgear_client.go:   User-Agent: curl/7.59.0
2023/07/27 20:12:52 netgear_client.go:   Content-Type: text/xml;charset=utf-8
2023/07/27 20:12:52 netgear_client.go:   Soapaction: urn:NETGEAR-ROUTER:service:DeviceInfo:1#GetAttachDevice
2023/07/27 20:12:52 netgear_client.go:   Host: routerlogin.net
2023/07/27 20:12:52 netgear_client.go:   Cookie: UNSET
2023/07/27 20:12:52 netgear_client.go: BODY:
2023/07/27 20:12:52 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope
  xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
  xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
    <SessionID>A7D88AE69687E58D9A00</SessionID>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <M1:GetAttachDevice xsi:nil="true" />
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
2023/07/27 20:12:52 netgear_client.go: Sending HTTP request to https://192.168.100.1/soap/server_sa/...
2023/07/27 20:12:52 netgear_client.go: Request headers:
2023/07/27 20:12:52 netgear_client.go:   User-Agent: curl/7.59.0
2023/07/27 20:12:52 netgear_client.go:   Content-Type: text/xml;charset=utf-8
2023/07/27 20:12:52 netgear_client.go:   Soapaction: urn:NETGEAR-ROUTER:service:DeviceInfo:1#GetSystemInfo
2023/07/27 20:12:52 netgear_client.go: Sending HTTP request to https://192.168.100.1/soap/server_sa/...
2023/07/27 20:12:52 netgear_client.go: Request headers:
2023/07/27 20:12:52 netgear_client.go:   User-Agent: curl/7.59.0
2023/07/27 20:12:52 netgear_client.go:   Content-Type: text/xml;charset=utf-8
2023/07/27 20:12:52 netgear_client.go:   Soapaction: urn:NETGEAR-ROUTER:service:DeviceConfig:1#GetTrafficMeterStatistics
2023/07/27 20:12:52 netgear_client.go:   Host: routerlogin.net
2023/07/27 20:12:52 netgear_client.go:   Cookie: UNSET
2023/07/27 20:12:52 netgear_client.go:   Content-Length: 580
2023/07/27 20:12:52 netgear_client.go: BODY:
2023/07/27 20:12:52 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope
  xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
  xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
    <SessionID>A7D88AE69687E58D9A00</SessionID>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <M1:GetTrafficMeterStatistics xmlns:M1="urn:NETGEAR-ROUTER:service:DeviceConfig:1">
    </M1:GetTrafficMeterStatistics>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
2023/07/27 20:12:52 netgear_client.go:   Host: routerlogin.net
2023/07/27 20:12:52 netgear_client.go:   Cookie: UNSET
2023/07/27 20:12:52 netgear_client.go:   Content-Length: 496
2023/07/27 20:12:52 netgear_client.go: BODY:
2023/07/27 20:12:52 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope
  xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
  xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
    <SessionID>A7D88AE69687E58D9A00</SessionID>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <M1:GetSystemInfo xsi:nil="true" />
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
2023/07/27 20:12:52 netgear_client.go: Response code: 401
2023/07/27 20:12:52 netgear_client.go: Response headers:
2023/07/27 20:12:52 netgear_client.go:   Www-Authenticate: Basic realm="NETGEAR R6700v3"
2023/07/27 20:12:52 netgear_client.go:   X-Frame-Options: SAMEORIGIN
2023/07/27 20:12:52 netgear_client.go:   Set-Cookie: XSRF_TOKEN=1222440606; Path=/
2023/07/27 20:12:52 netgear_client.go:   Content-Type: text/html
time="2023-07-27T20:12:52Z" level=error msg="Error while collecting client statistics: XML syntax error on line 4: element <meta> closed by </head>" source="clients_collector.go:122"
2023/07/27 20:12:52 netgear_client.go: Response code: 401
2023/07/27 20:12:52 netgear_client.go: Response headers:
2023/07/27 20:12:52 netgear_client.go:   Www-Authenticate: Basic realm="NETGEAR R6700v3"
2023/07/27 20:12:52 netgear_client.go:   X-Frame-Options: SAMEORIGIN
2023/07/27 20:12:52 netgear_client.go:   Set-Cookie: XSRF_TOKEN=1222440606; Path=/
2023/07/27 20:12:52 netgear_client.go:   Content-Type: text/html
time="2023-07-27T20:12:52Z" level=error msg="Error while collecting system info: XML syntax error on line 4: element <meta> closed by </head>" source="system_info_collector.go:110"
2023/07/27 20:12:52 netgear_client.go: Response code: 401
2023/07/27 20:12:52 netgear_client.go: Response headers:
2023/07/27 20:12:52 netgear_client.go:   Www-Authenticate: Basic realm="NETGEAR R6700v3"
2023/07/27 20:12:52 netgear_client.go:   X-Frame-Options: SAMEORIGIN
2023/07/27 20:12:52 netgear_client.go:   Set-Cookie: XSRF_TOKEN=1222440606; Path=/
2023/07/27 20:12:52 netgear_client.go:   Content-Type: text/html
time="2023-07-27T20:12:52Z" level=error msg="Error while collecting traffic statistics: XML syntax error on line 4: element <meta> closed by </head>" source="traffic_collector.go:126"
IncognitoTGT commented 9 months ago

Getting the same error. What's your router model?