Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend Issue | Docker | CentOS 9 Shell Script #651

Open
Soumya624 opened this issue Nov 5, 2024 · 14 comments
Open

Frontend Issue | Docker | CentOS 9 Shell Script #651

Soumya624 opened this issue Nov 5, 2024 · 14 comments

Comments

@Soumya624
Copy link

Soumya624 commented Nov 5, 2024

Hi @earthgecko ,

Thanks for the amazing work.

I have started the Skyline server and the aligned services through Docker from MAC. But, when pushing a random metric data through Postman (/metric_data_post) or uploading a CSV from web app, the data is not getting shown in the index page. It's going to Graphite from Flux. But, then nothing happening. Would be great if you can help.

image image image
@earthgecko
Copy link
Owner

Hi @Soumya624

If you just want to test analysing a time series in an adhoc manner you should navigate to the Vortex page in the UI (localhost:1500/vortex read the page text) and upload a reasonably sized time series as a csv with >= 1000 data points and then the analysis will be carried out immediately and the results returned to you in the UI (https://earthgecko-skyline.readthedocs.io/en/v4.0.0/vortex.html)

You are currently testing the real time pipeline by using the flux /metric_data_post which is meant for continuous real time data and there needs to at least 100 data points (MIN_TOLERABLE_LENGTH = 100 in settings.py) in the system before analysis begins on metrics submitted via this method.
Equally, uploading a csv via flux will just result in flux submitting that data to Graphite, if that csv contained more than 100 data points then Analyzer will only evaluate the last data point in the analysis unless the metric is part of a namespace that is defined in BATCH_PROCESSING_NAMESPACES . This is because flux for the real time and batch processing pipelines which both require continuous data.

If you are wanting to test /metric_data_post in this manner just create a script that runs on cron every minute and submits data, but generally you would just send metrics via collectors of some sort, Telegraf, Prometheus, etc.

I hope this helps.

@earthgecko
Copy link
Owner

Also @Soumya624 Skyline is not the metrics frontend, the frontend for metrics will be Graphite, Prometheus, VictoriaMetrics or Influxdb depending on what TSDB you are using. Skyline is not meant to provide a frontend to view metrics, it provides a view of the significant changes in metrics.

@Soumya624
Copy link
Author

Hi @earthgecko ,

Thanks a lot for the help. One small doubt. While trying out the Vortex, I got this. Do I need to change any URL anywhere?

image

Data used:
metrics.dummy.ts.csv

Would be really helpful if you can take a look!

@earthgecko
Copy link
Owner

earthgecko commented Nov 5, 2024

Hi @Soumya624 that is related to the variables in settings.py, specifically you have not changed the SKYLINE_URL.
I am not certain as to how you set this skyline instance up, but I am reading on docker? I could be mistaken, but if you have set this up on docker, just be advised that Skyline is no longer supporting running on docker and the docker patterns pre-date the additional of Vortex and do not support it, I am sorry.

If you are not using docker then ensure that you have nginx set up to serve the webapp and flux as per https://github.com/earthgecko/skyline/blob/master/etc/skyline.nginx.conf.d.example

Instead of localhost use a hostname and there should be no port defined as nginx should route the request appropriately.

SKYLINE_URL = 'http://<HOSTNAME_OR_FQDN>'

Ensure that you properly define any variables in settings.py that are tagged with [USER_DEFINED] with the appropriate values.

You will have an issue using Vortex because although you are serving the webapp on port 1500, the /flux endpoint should be handled and routed by nginx to the flux instance which would be on 127.0.0.1:8000

For all the functionality to work properly you need to use nginx to route requests to the appropriate backend, be that the webapp or flux. Seeing as you are accessing the webapp directly and not via nginx I did not think Vortex will probably not work.

If you are using docker and have used the deprecated docker patterns as is then you should be using:

SKYLINE_URL = 'https://skyline-docker-skyline-1'

But once again the docker set up will not support Vortex and as the docs and code says, docker has been deprecated, please use a proper VM or server.

If you want to deploy Skyline on a VM let me know and I will provide an updated skyline.dawn.sh build script for CentOS Stream 9, which is the next OS that going to be supported and in the process of finalising for the next release.

@Soumya624
Copy link
Author

Soumya624 commented Nov 5, 2024

An updated .sh would be really helpful @earthgecko . Based on your suggestion, I just spinned up the docker containers with the latest SKYLINE_URL. Vortex didn't work.

I was wondering whether Flux and Cron Jobs which you had suggested earlier would go with the current docker!

@Soumya624
Copy link
Author

Hi @earthgecko ,

Initiated a VM with CentOS Stream 9. Would be great if you can share the script. Thanks a lot again for the help!

@earthgecko
Copy link
Owner

Hi @Soumya624 I will try to cut an alpha release at some point later today. It does not make sense to deploy the new OS version with Python 3.8 or on version v4.0.0. I know that in the Python ecosystem a number of libraries jumped the gun on Python 3.8 EOL and I know some of the dependencies with 3.8 will not be available and there will be dependency conflicts with new packages. The alpha release will be for Python 3.10.15 with the latest dependencies which are all tested and working.

@Soumya624
Copy link
Author

Awesome. Thanks for the much needed Python version update for 4.0.0!

@Soumya624 Soumya624 changed the title No Metrics Data in Frontend Frontend Issue | Docker | CentOS 9 Shell Script Nov 6, 2024
@earthgecko
Copy link
Owner

Hi @Soumya624 sorry for the delay. I have not managed to cut a release yet because I ran into some issue updating some libraries, algorithms and numba jit functions to run with numpy >= 2 and some changes between pandas 2.0.3 and 2.2.3 (which now supports numpy 2) relating to stricter handling of the pd.concat function.
I shall attempt to fix/handle these before cutting a release and when these are either fixed or handled I will update you, that should be in the next day or two I hope.

@Soumya624
Copy link
Author

Sure @earthgecko !

@earthgecko
Copy link
Owner

Hi @Soumya624 the v5.0.0-alpha branch is now available.

Please follow the build script usage instructions at https://earthgecko-skyline.readthedocs.io/en/v5.0.0-alpha/development/dawn.html#deploy-using-the-build-script (note the /en/v5.0.0-alpha in that url path, not /en/latest).

@Soumya624
Copy link
Author

Gotcha @earthgecko . On it rn. Thanks!

@earthgecko
Copy link
Owner

Hi @Soumya624

There have been a number of regressions surfaced in various analysis and functions mostly due to strict np.float64 typing in numpy 2.2.3 and some other typing changes.

The following snippet can be used to update the code on your server and will not modify your settings.py (because nothing in that has changed) it will just update the files that have been modified.

I am expecting to find more regressions so you may want to run this occassionally on your server to see if there have been any updates while you are running on this branch. I will not update this issue with any further notices to say that things have updated (unless there is a specific need to), just pull and check.

TIMESTAMP=$(date +"%Y%m%d%H%M%S")
cd /opt/skyline/github/skyline
# Backup settings just in case...
cp /opt/skyline/github/skyline/skyline/settings.py "/opt/skyline/github/skyline/skyline/settings.py.${TIMESTAMP}"
git pull origin v5.0.0-alpha
SKYLINE_SERVICES="thunder
analyzer
analyzer_batch
mirage
crucible
boundary
ionosphere
luminosity
panorama
webapp
vista
snab
flux
horizon"
for i in $SKYLINE_SERVICES
do
  systemctl restart "$i"
  if [ $? -ne 0 ]; then
    echo "failed to restart $i" 
  else
    echo "restarted $i" 
  fi
done

@Soumya624
Copy link
Author

Sure. Please give me a day or two. I am going through the updates. I will test and notify if any issues/bugs arises in the latest version.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants