0

I'm interested in collecting stats for uWSGI via snmp for graphing in Cacti. Per these docs I'm starting uwsgi with:

uwsgi -s :3031 --udp 192.168.10.1:2222 --snmp --snmp-community foo --emperor /usr/local/uwsgi/vassals --emperor-tyrant --pidfile /var/run/uwsgi.pid --vacuum

The example snmpget command they provided works fine:

$ snmpget -v2c -c foo 192.168.10.1:2222 1.3.6.1.4.1.35156.17.1.1
SNMPv2-SMI::enterprises.35156.17.1.1 = Counter64: 0

however, I cannot see any other snmp "values" besides that one. Shouldn't I be able to snmpwalk from the base OID? When I try to see what values are exposed, I get a timeout.

snmpwalk -v2c -c foo 192.168.10.1:2222 1.3.6.1.4.1.35156.17
Timeout: No Response from 192.168.10.1:2222

From the docs I referenced:

General information is managed by the uWSGI server itself. The base OID to access uWSGI SNMP information is 1.3.6.1.4.1.35156.17 (iso.org.dod.internet.private.enterprise.unbit.uwsgi). General options are mapped to 1.3.6.1.4.1.35156.17.1.x.

I'm either not understanding snmp in general, or what uWSGI is providing snmp-wise. Thanks for any help.

Banjer
  • 3,974
  • 12
  • 41
  • 47

2 Answers2

1

Hope this helps someone as I couldn't find these uwsgi OIDs anywhere; had to manually compare the metrics in the metrics folder with one OID at time:

  • worker.X.requests 1.3.6.1.4.1.35156.17.3.X.1

  • worker.X.delta_requests 1.3.6.1.4.1.35156.17.3.X.2

  • worker.X.avg_response_time 1.3.6.1.4.1.35156.17.3.X.8

  • worker.1.total_tx 1.3.6.1.4.1.35156.17.3.1.9

  • worker.1.rss_size 1.3.6.1.4.1.35156.17.3.1.11

  • worker.1.vsz_size 1.3.6.1.4.1.35156.17.3.1.12

  • busy_workers 1.3.6.1.4.1.35156.17.5.3

  • idle_workers 1.3.6.1.4.1.35156.17.5.4

  • overloaded 1.3.6.1.4.1.35156.17.5.5

  • total_requests 1.3.6.1.4.1.35156.17.1.1

  • total_trasmited_data 1.3.6.1.4.1.35156.17.5.100

  • rss_memory_total 1.3.6.1.4.1.35156.17.5.101

  • vsz_memory_total 1.3.6.1.4.1.35156.17.5.102

  • avg_response_time 1.3.6.1.4.1.35156.17.5.103

Les Salmon
  • 11
  • 1
  • and found them now in the source code: https://github.com/unbit/uwsgi/blob/e24fef1fab2a412dce6bd39b4444b2b5775d0d6d/core/metrics.c#L746 – Les Salmon Apr 20 '23 at 07:11
1

The "old" snmp stats export only values managed by the apps via the api.

The new api is this one:

http://uwsgi-docs.readthedocs.org/en/latest/Metrics.html

that expose values via snmp as 1.3.6.1.4.1.35156.17.3.x

in both cases you cannot walk but only get direct values

roberto
  • 1,827
  • 12
  • 8
  • OK knowing that I cannot walk the values and that its expected is helpful. Thanks for the link. – Banjer Nov 13 '13 at 15:28