View Issue Details

IDProjectCategoryView StatusLast Update
0000228My infrastructureGeneralpublic2024-05-31 12:42
Reporterdvl Assigned Todvl  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0000228: PGCon snmpd not getting nginx data
Description
[20:49 www dvl ~] % echo /usr/local/etc/snmp/phpfpm-sp | sudo su -fm snmpd
 </html>nter>nginx/1.24.0</center></h1></center>d>
[20:49 www dvl ~] % echo /usr/local/etc/snmp/nginx-python3.py | sudo su -fm snmpd
Traceback (most recent call last):
  File "/usr/local/etc/snmp/nginx-python3.py", line 5, in <module>
    data = urlopen('http://localhost/nginx-status').read()
  File "/usr/local/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/local/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/local/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
[20:50 www dvl ~] % 
TagsNo tags attached.

Activities

dvl

2024-05-30 20:56

manager   ~0000259

First change, use IP address:

data = urlopen('http://10.55.0.42/nginx-status').read()

dvl

2024-05-30 21:02

manager   ~0000260

NOTE: change ansible to take ip address for:

extend phpfpmsp         /usr/local/etc/snmp/phpfpm-sp
extend nginx            /usr/local/etc/snmp/nginx-python3.py


They need to be .j2 files (templates).

dvl

2024-05-31 12:42

manager   ~0000261

Fixed.

Issue History

Date Modified Username Field Change
2024-05-30 20:51 dvl New Issue
2024-05-30 20:51 dvl Status new => assigned
2024-05-30 20:51 dvl Assigned To => dvl
2024-05-30 20:56 dvl Note Added: 0000259
2024-05-30 21:02 dvl Note Added: 0000260
2024-05-31 12:42 dvl Status assigned => closed
2024-05-31 12:42 dvl Resolution open => fixed
2024-05-31 12:42 dvl Note Added: 0000261