graphite-project / graphite-web

A highly scalable real-time graphing system
http://graphite.readthedocs.org/
Apache License 2.0
5.89k stars 1.26k forks source link

graphite don't create metrics #2774

Closed ray-nymous closed 2 years ago

ray-nymous commented 2 years ago

i installed graphite in archlinux. i made sudo PYTHONPATH=/opt/graphite/webapp django-admin collectstatic --noinput --settings=graphite.settings sudo PYTHONPATH=/opt/graphite/webapp/ django-admin migrate --settings=graphite.settings --run-syncdb

ray-nymous commented 2 years ago

ts.. made reverse server for nginx. i can see graphite browser. but metrics not creates when i send it to. whisper directory is also empty. here is some data from console data.txt graphite-web.sysctl.txt local_settings.txt

2

in arch it runs as /opt/graphite/bin/run-graphite-devel-server.py in systemctl.

i also tried uwsgi with nginx. without success also. i spent at lest 6 hours today, and the same about yesterday. how can i just make it work?

ray-nymous commented 2 years ago
 root@hikke /o/g/w/graphite# /usr/bin/carbon-cache.py --config=/etc/carbon/carbon.conf start
/usr/lib/python3.10/site-packages/ceres-1.1.0-py3.10.egg/ceres.py:907: SyntaxWarning: "is" with a literal. Did you mean "=="?
/usr/lib/python3.10/site-packages/ceres-1.1.0-py3.10.egg/ceres.py:907: SyntaxWarning: "is" with a literal. Did you mean "=="?
Starting carbon-cache (instance a)
/usr/lib/python3.10/os.py:1029: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  return io.open(fd, mode, buffering, encoding, *args, **kwargs)
root@hikke /o/g/w/graphite#

i think i found problem. is that behaviour something unusual?

deniszh commented 2 years ago

Ceres is outdated and probably not compatible with python 3. Try to remove ceres package

пн, 15 авг. 2022 г., 03:28 ray-nymous @.***>:

@. /o/g/w/graphite# /usr/bin/carbon-cache.py --config=/etc/carbon/carbon.conf start /usr/lib/python3.10/site-packages/ceres-1.1.0-py3.10.egg/ceres.py:907: SyntaxWarning: "is" with a literal. Did you mean "=="? /usr/lib/python3.10/site-packages/ceres-1.1.0-py3.10.egg/ceres.py:907: SyntaxWarning: "is" with a literal. Did you mean "=="? Starting carbon-cache (instance a) /usr/lib/python3.10/os.py:1029: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used return io.open(fd, mode, buffering, encoding, args, kwargs) @.*** /o/g/w/graphite#

i think i found problem. is that behaviour something unusual?

— Reply to this email directly, view it on GitHub https://github.com/graphite-project/graphite-web/issues/2774#issuecomment-1214513093, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJLTVWQAP4F4P7FCJ3QE63VZGMKJANCNFSM56QVO6QA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ray-nymous commented 2 years ago

i removed it. now it starts like that and it works without errors. i'm not sure influenced that warning on metrics creation or not

root@hikke /e/carbon# /usr/bin/python /usr/bin/carbon-cache.py --config=/etc/carbon/carbon.conf start

Starting carbon-cache (instance a)
/usr/lib/python3.10/os.py:1029: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  return io.open(fd, mode, buffering, encoding, *args, **kwargs)
root@hikke /e/carbon#

in systemctl i seen only warnings. no errors. in journalctl all fine also

root@hikke /e/carbon# systemctl status carbon-cache.service graphite-web.service
● carbon-cache.service - Graphite Carbon Cache
     Loaded: loaded (/usr/lib/systemd/system/carbon-cache.service; disabled; preset: disabled)
     Active: active (running) since Mon 2022-08-15 18:46:19 UTC; 1min 19s ago
    Process: 445857 ExecStart=/usr/bin/carbon-cache.py --config=/etc/carbon/carbon.conf start (code=exited, status=0/SUCCESS)
   Main PID: 445863 (carbon-cache.py)
      Tasks: 3 (limit: 19057)
     Memory: 28.0M
        CPU: 473ms
     CGroup: /system.slice/carbon-cache.service
             └─445863 /usr/bin/python /usr/bin/carbon-cache.py --config=/etc/carbon/carbon.conf start

авг 15 18:46:19 hikke.net systemd[1]: Starting Graphite Carbon Cache...
авг 15 18:46:19 hikke.net carbon-cache.py[445857]: /usr/lib/python3.10/os.py:1029: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
авг 15 18:46:19 hikke.net carbon-cache.py[445857]:   return io.open(fd, mode, buffering, encoding, *args, **kwargs)
авг 15 18:46:19 hikke.net systemd[1]: Started Graphite Carbon Cache.

● graphite-web.service - Graphite-web daemon
     Loaded: loaded (/usr/lib/systemd/system/graphite-web.service; disabled; preset: disabled)
     Active: active (running) since Mon 2022-08-15 18:46:19 UTC; 1min 20s ago
   Main PID: 445856 (python)
      Tasks: 3 (limit: 19057)
     Memory: 73.5M
        CPU: 2.123s
     CGroup: /system.slice/graphite-web.service
             ├─445856 python /opt/graphite/bin/run-graphite-devel-server.py --libs=/opt/graphite/webapp/ /opt/graphite/
             └─445868 /usr/bin/python /opt/graphite/bin/run-graphite-devel-server.py --libs=/opt/graphite/webapp/ /opt/graphite/

авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: django-admin.py runserver --pythonpath /opt/graphite/webapp --settings graphite.settings 0.0.0.0:8080
авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: Performing system checks...
авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: System check identified some issues:
авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: WARNINGS:
авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: ?: (admin.W411) 'django.template.context_processors.request' must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: System check identified 1 issue (0 silenced).
авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: August 15, 2022 - 18:46:20
авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: Django version 4.0.6, using settings 'graphite.local_settings'
авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: Starting development server at http://0.0.0.0:8080/
авг 15 18:46:20 hikke.net run-graphite-devel-server.py[445868]: Quit the server with CONTROL-C.
root@hikke /e/carbon#

maybe i misconfigured something, and warnings are not matters. journalctl shows the same as shown above. no errors. what else can i check?

ray-nymous commented 2 years ago

ok. i found the reason. in archlinux carbon delivers with config

CONF_DIR = /etc/carbon/
GRAPHITE_CONF_DIR = /etc/carbon/
LOG_DIR = /var/log/carbon/
PID_DIR = /run/
STORAGE_DIR = /var/lib/carbon/
GRAPHITE_STORAGE_DIR = /var/lib/carbon/
LOCAL_DATA_DIR = /var/lib/carbon/whisper/
DATABASE = whisper
ENABLE_LOGROTATION = True
USER = carbon
MAX_CACHE_SIZE = inf
MAX_UPDATES_PER_SECOND = 500
MAX_CREATES_PER_MINUTE = 50
MIN_TIMESTAMP_RESOLUTION = 1
LINE_RECEIVER_INTERFACE = 127.0.0.1
LINE_RECEIVER_PORT = 2003
PICKLE_RECEIVER_INTERFACE = 127.0.0.1
PICKLE_RECEIVER_PORT = 2004
USE_INSECURE_UNPICKLER = False
CACHE_QUERY_INTERFACE = 127.0.0.1
CACHE_QUERY_PORT = 7002
USE_FLOW_CONTROL = True
LOG_UPDATES = False
LOG_CREATES = False
LOG_CACHE_HITS = False
LOG_CACHE_QUEUE_SORTS = False
LOG_LISTENER_CONN_SUCCESS = False
CACHE_WRITE_STRATEGY = sorted
WHISPER_AUTOFLUSH = False
WHISPER_FALLOCATE_CREATE = True
CARBON_METRIC_PREFIX = carbon
CARBON_METRIC_INTERVAL = 0
ENABLE_TAGS = False

where LOCAL_DATA_DIR was setted to /var/lib/carbon/whisper/ directory instead of /opt/graphite/storage that used by default

so in arch is needed to change directory, and set reverse proxy. after that all works perfectly