Skip to content

dashboard

Reqd Squid and ufdbguard status.

read

The read API takes an action field.

Valid actions are:

  • status
  • proxy-charts
  • proxy-stats
  • filter-stats

Input example:

{
  "action": "status"
}

Input example for proxy-charts action. Accept an extra time parameters in seconds:

{
  "action": "proxy-charts",
  "time": "900"
}

Input example for status action. Accept an extra hostname parameter to calculate lightsquid url.

{
  "action": "status",
  "hostname": "test.org"
}

Output

status

Return current proxy configuration and statistics from squidclient;

Output example:

{
  "filter": {
    "status": "enabled",
    "antivirus": "disabled",
    "profiles": 5,
    "antivirus_db":1559052607
  },
  "proxy": {
    "client_bytes_in": 17746944,
    "status": "enabled",
    "PortBlock": "disabled",
    "rules": 4,
    "GreenMode": "transparent",
    "client_errors": "0",
    "source-bypass": 2,
    "destination-bypass": 6,
    "client_bytes_out": 536740864,
    "client_hits": "0",
    "cpu_usage": "0.07",
    "client_requests": "322642",
    "BlueMode": "transparent"
  },
  "url": "https://test.org:980/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

proxy-charts

Return client connections and data transfer from netdata.

Output example:

{
  "requests": {
    "data": [
      [
        1556001633,
        30,
        12,
        2
      ],
      ...
    ],
    "labels": [
      "time",
      "requests",
      "hits",
      "errors"
    ]
  },
  "net": {
    "data": [
      [
        1556001633,
        2,
        15,
        10
      ],
      ...
    ],
    "labels": [
      "time",
      "in",
      "out",
      "hits"
    ]
  }
}

proxy-stats

Return Squid statistics using lightsquid from current day.

Example:

{
  "traffic": 1110168984,
  "top_users": [
    {
      "bytes": 345150732,
      "name": "myhost.local",
      "percentage": "31.09"
    },
    ...
  ],
  "users": 30
}

filter-stats

Return ufdbguard statistics from current log.

Example:

{
  "profile": [
    {
      "hits": 442,
      "name": "default"
    },
    ...
  ],
  "ip": [
    {
      "hits": 107,
      "name": "myhost.local"
    },
    ...
  ],
  "requests": 440061,
  "blocked": 350,
  "category": [
    {
      "hits": 218,
      "name": "news"
    },
    ...
  ],
  "host": [
    {
      "hits": 107,
      "name": "s.ilcorsaronero.info"
    },
    ...
  ]
}