🌉 bridged from @7EP6vuI@feddit.org by Tidepool
7EP6vuI
@7ep6vui.feddit.org.ap.tdpl.io
Lightweight log monitoring and notification
I want to be notified about stack traces and certain events in my logs. I don't want to setup the ELK stack or other complicated resource hungry software. I'm not interested in searching or aggregating the logs. My current idea is: • the application logs to stdout which is collected by systemd. • i use the fluent bit systemd input to collect and parse the logs • most of the logs will be filtered out, as they are normal requests. • the http output of fluent bit will post to a small python script, which posts to altermanager (i'm using prometheus / alertmanager anyway) Is this a wise idea? What other solution would you suggest?
Music video: ~20 years old; pixel graphics; earth exploding at the end
• electronic music • maybe at the beginning a person standing, foot moves with the beat • at the end: • squirrel or other animal holding a blasting machine • animal is looking at the viewer an grins/laughs • animal pressing down the T-Handle • earth (shown from space) explodes
how to put a set of endpoints under an auth like restriction?
i'm completely new to the django eco system, coming from flask. what i want (and don't know how to accomplish) is to put some restrictions to a set of urls:
x/<uuid>/imagesx/<uuid>/imageuploadand others should only work, ifuuidcan be found in the database and is still valid. in flask i would probably use a blueprint, but this concept does not seem to exist in django, right? what i like about the blueprint concept is, that it's not possible to add a url under thex/<uuid>"namespace" and forgetting about the auth mechanism, as this is handled for all urls in the blueprint. how would you handle this in django? i've already learned about apps and a custom middleware, but this looks quite complicated on first sight? as the middleware always intercepts all requests, and i would have to check on my own if this is a request tox/<uuid>? i've also looked at existing apps, and django-rq uses thestatt_member_requireddecorator for each view. i will probably build something like that, but i would be more confident if i could apply this to the whole app, instead of having to decorate each function.