Giter VIP home page Giter VIP logo

Comments (5)

stephanediondev avatar stephanediondev commented on May 21, 2024

Hi

Sorry I don't have considered the subscriptions with Docker

First thing todo:

Add 2 environment variables. But you need a SMTP server with credentials (or there is a service like sendmail to add in the container)

MAILER_DSN=smtp://user:password@host:port/?encryption=ssl
[email protected]

Then you need to set the cron script: here I can improve and add the command automatically on container creation

crontab -e
# m h dom mon dow command
*/5 * * * * cd /var/www/html && bin/console app:send-notifications

In /admin/app-notifications you will have the history with all the notifications sent

image image

from elasticsearch-admin.

stephanediondev avatar stephanediondev commented on May 21, 2024

After some tests, it's difficult for me to have cron running in container, I don't have enough experience with Docker

from elasticsearch-admin.

marcopolomercader avatar marcopolomercader commented on May 21, 2024

Thank you for the quick response. It was nearly impossible for me to run the notifications without getting an error. When forcing to send notifications with app:send-notifications shows the next error:

{"message":"Error thrown while running command \"app:send-notifications\". Message: \"[VAPID] Public key should be 65 bytes long when decoded.\"","context":{"exception":{"class":"ErrorException","message":"[VAPID] Public key should be 65 bytes long when decoded.","code":0,"file":"/var/www/html/vendor/minishlink/web-push/src/VAPID.php:67"},"command":"app:send-notifications","message":"[VAPID] Public key should be 65 bytes long when decoded."},"level":500,"level_name":"CRITICAL","channel":"console","datetime":"2023-09-25T13:49:27.246719+00:00","extra":{}}
13:49:27 CRITICAL  [console] Error thrown while running command "app:send-notifications". Message: "[VAPID] Public key should be 65 bytes long when decoded." ["exception" => ErrorException { …},"command" => "app:send-notifications","message" => "[VAPID] Public key should be 65 bytes long when decoded."]
{"message":"Command \"app:send-notifications\" exited with code \"1\"","context":{"command":"app:send-notifications","code":1},"level":100,"level_name":"DEBUG","channel":"console","datetime":"2023-09-25T13:49:27.267825+00:00","extra":{}}

In VAPID.php line 67:
                                                            
  [VAPID] Public key should be 65 bytes long when decoded.  
                                                            

app:send-notifications

Maybe I have a bad understanding of how this app works, but those things and also the /admin/cluster/audit path got errors. Maybe is better to do a dedicated instllation for the app and not using docker images? Whats your suggestion?

Internal Server Error
App\Model\ElasticsearchRepositoryModel::setName(): Argument #1 ($name) must be of type ?string, int given, called in /var/www/html/src/Model/ElasticsearchRepositoryModel.php on line 180

File: /var/www/html/src/Model/ElasticsearchRepositoryModel.php
Line: 86
Route: cluster_audit
Installation type: docker
PHP version: 8.2.10
Symfony version: 6.3.4
Elasticsearch version: 8.10.0
Browser: Chrome 116.0
OS: Windows 10

Also, a suggestion for the app is to have the ability to show different clusters without have multiple installations of the app.
Thanks for the help in advance.

from elasticsearch-admin.

stephanediondev avatar stephanediondev commented on May 21, 2024

Hi

About the notifications, you need also to set the environment variables VAPID_PUBLIC_KEY and VAPID_PRIVATE_KEY.
There is a command to generate the values bin/console app:generate-vapid
This is required for the Push API.

The errors related to snapshots and repositories are not due to your Docker installation.
This project is very confidential, not a lot of users. I tried to cover multiple ES versions, but still you can have surprises.

I think you have a repository with a number as name.
And when ES returns the JSON, the repository key is an integer instead of a string.
And some functions in the application were defined to have a string for the name.

See "123" as key for the repository name

image

I made a new release to fix that (convert to string).

I think the only challenge with Docker is to have the nofications working.

from elasticsearch-admin.

marcopolomercader avatar marcopolomercader commented on May 21, 2024

Hey! Thank you very much for that release.

It was impossible for me to make the notifications working due to the crontab thing. Doesn't care because I already made the notifications through prometheus.

The application is awesome and really helpful. As a suggestions the app could have the ability to list multiple clusters like Cerebro, whenever I need, not all at the same time because, In our case, we have multiple elastic clusters for different purposes. All in all, it's an amazing application. Also, really fast answer. 😉

from elasticsearch-admin.

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.