Code Monkey home page Code Monkey logo

Comments (11)

valentin-krasontovitsch avatar valentin-krasontovitsch commented on August 17, 2024

hi, and thank you for using bonfire : )

i'm afraid i'm having a hard time reproducing your problem - which might be because my pip foo is not very good : /

i'm assuming you're running version 0.0.8 if you installed the day before. would you mind confirming by running

python3 -m pip show bonfire

besides that, i'm not sure, maybe your timestamp is the problem? would you mind trying something like

bonfire -@ '1 hour ago' -f

or perhaps

bonfire -@ '1 day ago' -f

from bonfire.

jcudilla avatar jcudilla commented on August 17, 2024

Thanks for your suggestion, this is how it looks:

[root@client1 bonfire]# python3 -m pip show bonfire
Name: bonfire
Version: 0.0.8
Summary: Add a small description here!
Home-page: http://...
Author: Malte Harder
Author-email: [email protected]
License: new BSD
Location: /usr/local/lib/python3.6/site-packages
Requires: arrow, keyring, termcolor, parsedatetime, python-dateutil, click, requests, six
Required-by:
[root@client1 bonfire]# bonfire -@ '1 hour ago' -f
Enter password for [email protected]:9000/api:

^C
Interrupted follow mode. Exiting...
[root@client1 bonfire]#

I had to ctrl+c only to get back the prompt.

from bonfire.

valentin-krasontovitsch avatar valentin-krasontovitsch commented on August 17, 2024

hmm that's disconcerting. let me think a bit about it, try out some stuff, and get back to you

could you give me an example query / invocation that produces logs, without follow mode?

from bonfire.

jcudilla avatar jcudilla commented on August 17, 2024

sure, this is how it kind of looks w/out the follow flag:

[root@client1 bonfire]# bonfire -@ '1 day ago'
Enter password for [email protected]:9000/api:
NOTICE [2021-07-12 19:41:25.00] client2 python: detected unhandled Python exception # source:client2; facility:user-level; line:; module:
INFO [2021-07-12 19:41:26.00] client3 nvexporter: source:client3; facility:system daemon; line:; module:
NOTICE [2021-07-12 19:41:27.00] client4 source:client4; facility:user-level; line:; module:
WARNING [2021-07-12 19:41:27.00] client4 source:client4; facility:user-level; line:; module:
ERROR [2021-07-12 19:41:27.00] client4 launchd[1]: Service could not initialize
INFO [2021-07-12 19:41:27.00] client5 Service could not initialize: Unable to set current working directory; facility:user-level; line:; module:
DEBUG [2021-07-12 19:41:28.00] client2 facility:security/authorization; line:; module:
INFO [2021-07-12 19:41:32.00] client2 nvexporter: 2021/07/12 19:41:32; facility:system daemon; line:; module:
INFO [2021-07-12 19:41:34.00] client3 agent: kbuilds running... # source:client3; facility:system daemon; line:; module:
INFO [2021-07-12 19:41:34.00] client3 facility:system daemon; line:; module:
[root@client1 bonfire]#

from bonfire.

valentin-krasontovitsch avatar valentin-krasontovitsch commented on August 17, 2024

ok so first off - sorry, my first suggestion of running with the -@ option was nonesense, in follow mode you can't set a before time... follow mode will always start following from one second ago...

secondly, probably you have truncated the output of bonfire, i.e. shortened the logs that you pasted here, and thank you for that, but perhaps you don't have that many logs appearing in graylog? i dunno... are you sure that there are logs being sent to graylog while you're following? probably you are, silly question, i just have to ask.

finally, i'm working on some new features in a new release, and i've created some release candidates.

perhaps you want to give those a spin - among other things, follow mode starts from 10 minutes ago, making it easier to see logs appear.

you can give it a spin by running

python3 -m pip install [--user] bonfire-1.0.0rc2

the --user option is of course optional, if you just want to install it for your own user, instead of system wide, while trying it out... otherwise run without --user and probably with sudo : )

let me know how it goes!

from bonfire.

jcudilla avatar jcudilla commented on August 17, 2024

Thanks but I got this error using that specific version Could not find a version that satisfies the requirement bonfire-1.0.0rc2 (from versions: ) No matching distribution found for bonfire-1.0.0rc2

On the other hand, you were asking about the log(on web UI, we can see logs getting ingested almost every few seconds), Using bonfire, I just realize I cannot see the last few hours trying bonfire -@ '1 hour ago' up to bonfire -@ '6 hour ago' but occasionally seeing some output on bonfire -@ '7 hour ago' then finally seeing the normal last 10 lines when using bonfire -@ '8 hour ago'

which makes me wonder if it has something to do with the timezone and if I should switch back the server to the default UTC?

referenced using https://www.joda.org/joda-time/timezones.html, this is the server time

[root@graylogserver ~]# grep root_timezone /etc/graylog/server/server.conf
root_timezone = America/Vancouver
[root@graylogserver ~]#

and on the UI system/overview, this is how it looks:

User $user:		2021-07-18 10:45:08 -07:00
Your web browser:	2021-07-18 10:45:08 -07:00
Graylog server:		2021-07-18 10:45:08 -07:00

What do you think, any suggestions?

from bonfire.

valentin-krasontovitsch avatar valentin-krasontovitsch commented on August 17, 2024

ah, right, right, that might be the source of the problems - you see, it seems that bonfire expects graylog's timezone to be UTC : /

is it possible for you to change the timezone of your graylog server?

if not, i should investigate this limitation and see if it can be fixed!

re: no matching distribution found - that's very strange, i tried installing it, and it worked, and you can even find it on the pypi - https://pypi.org/project/bonfire/#history

sadly i know too little about pypi and pip to offer any suggestions to troubleshoot / debug there...

but of course the newer version won't help you at all with the timezone problem (yet)..

from bonfire.

jcudilla avatar jcudilla commented on August 17, 2024

Thanks for your suggestion, I tried changing root_timezone = UTC (or comment out) and it took care of the user time in the graylog UI but still I'm not able to use -f option and only able to see using bonfire -@ '8 hour ago'

User $user:		2021-07-22 04:40:23 +00:00
Your web browser:	2021-07-21 21:40:23 -07:00
Graylog server:		2021-07-21 21:40:23 -07:00

We then, tried changing the server/OS time to UTC via timedatectl tool which updates /etc/localtime.

User $user:		2021-07-22 04:49:49 +00:00
Your web browser:	2021-07-21 21:49:49 -07:00
Graylog server:		2021-07-22 04:49:49 +00:00

This finally made me see bonfire -@ '1 hour ago' but the server seems to have stopped ingesting client logs hence I'm not able to see incoming logs both on the UI and bonfire -f option. After further service restarts and checking, we ended up reverting to America/Vancouver timezone.

regarding 1.0.0rc2, I also don't know much about pydev nor pip but thanks for your confirmation. I'll ask around, it could be just me πŸ˜…

[root@client1 ~]# curl -L -s "https://pypi.org/pypi/bonfire/json"| jq  -r '.releases | keys | .[]' | sort -V
0.0.5
0.0.6
0.0.7
0.0.8
0.0.8b1
1.0.0rc1
1.0.0rc2
[root@client1 ~]# python3 -m pip install bonfire-1.0.0rc2
ERROR: Could not find a version that satisfies the requirement bonfire-1.0.0rc2 (from versions: none)
ERROR: No matching distribution found for bonfire-1.0.0rc2
[root@client1 ~]#

from bonfire.

valentin-krasontovitsch avatar valentin-krasontovitsch commented on August 17, 2024

OK, I'm definitely confused and not certain about how time zone settings in the server work, and how they effect consuming log messages, and so on, so i should read / figure out more about that to be able to be of assistance there.

i will however, as it seems more tangible (although i might still have to understand the server side things in order to test it), try to fix the timezone requirement in the client - and perhaps abuse you for testing ; )

give me some time to figure it out, please. i have a hunch that it should be easy, but you never know....

also, about the pip invocation - i think the correct syntax for installing a specific version of a package with pip is to use == rather than a simple dash between package name and verison, as in

python3 -m pip install bonfire==1.0.0rc2

see if that helps!

gonna let you know here when i have a timezone aware release candidate ready for testing.

from bonfire.

jcudilla avatar jcudilla commented on August 17, 2024

python3 -m pip install bonfire==1.0.0rc2 worked but with the same behavior so I may need to wait for the timezone aware release, thank you..

from bonfire.

valentin-krasontovitsch avatar valentin-krasontovitsch commented on August 17, 2024

so sorry i completely forgot about this as i went into parental leave... gonna try to take a look next week!

from bonfire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.