Re: Issue with opening a bookmarked page when the user is logged out

2018-08-25 Thread Taher Alkhateeb
Hmmm, based on Girish's feedback I think perhaps the next step should be to
open a JIRA and further investigate. Thinking about it some more, maybe
this would have an impact on the REST API project we're working on.

On Sun, Aug 26, 2018, 7:57 AM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:

> Hi Ritesh
>
> It does look like an issue to me.
>
> I believe (correct me if I am wrong) it is not so much about whether GET is
> appropriate here, it is more about that the framework is unable to handle
> multiple request parameters with same name, which is a common case when we
> talk about multiple check boxes on a form representing a single entity. The
> fact that GET is doing it's job correctly when the user is logged in (means
> when you change the method from POST to GET and the user is already logged
> in) and not so much when the user is logged out and the request is made via
> bookmark, shows that the code is not working properly.
>
> Then, there is also an issue with URL encoding and decoding that becomes
> apparent with executing your scenario. Whether it is correct to change the
> form method is arguable, but the code should be able to handle it. If a
> form were to be designed with GET method and the only elements present on
> the form are two check boxes and a text field and if you were to select
> both check boxes and have value with spaces in the text box, this scenario
> would still fail.
>
> I think the simplest approach would have been to just store query string
> (request.getQueryString()) in the session attribute instead of Map (but I
> think it was well pondered upon to use Map) and then just redirecting to
> the saved URL once the user loges in. I did it on my local workstation and
> it just worked perfectly. May be one reason why a map was used instead of
> storing query string was to handle unencoded requests coming from browsers
> such as IE. I may be wrong so please correct me if anyone has an idea
> around this piece of code as to why Map was used instead of storing the
> query string in session to be used later on.
>
> If you can do something to fix the existing code, that would be better
> approach, IMO.
>
> May be it is not a major issue but certainly worthy of having a dedicated
> JIRA for. Everybody, please chime in and provide your thoughts.
>
> Thanks and Best regards,
> Girish Vasmatkar
> HotWax Systems
>
> On Sat, Aug 25, 2018 at 8:03 PM Taher Alkhateeb <
> slidingfilame...@gmail.com>
> wrote:
>
> > Okay, I understand this issue. I don't think it is possible to
> > abstract away a complex search screen with http GET method for
> > bookmarks. The performFind service is quite complex and it is
> > difficult to replicate the requirements using GET. GET is not designed
> > to handle multiple languages, spaces, and other peculiarities that are
> > needed for such a screen to work.
> >
> > There are multiple solutions that I can see here. One of them is
> > simply to create a new entity, let's call it SearchFilter, that saves
> > search parameters, which can be applied later on. Either way, you need
> > to customize, your problem is not OFBiz, your problem is http GET
> > limitations.
> > On Fri, Aug 24, 2018 at 12:35 PM Ritesh Kumar
> >  wrote:
> > >
> > > Using the POST method does not append form data to the URL, i.e, the
> > > parameters will not be visible in the URL.
> > > For example, take a Find Screen (say, FindWorkEffort) which send data
> > > through a form with POST method. Apply some filters (say, status). No
> > > applied filters appear in the URL.  Bookmark this page. Next time when
> I
> > > open this bookmark, those applied filters will not be there as this
> page
> > is
> > > being rendered using data from the URL and since the applied filters
> were
> > > not there in the bookmarked URL, this page is rendered without the
> > applied
> > > filters. That is why I used GET form method so that I am able to get
> the
> > > page with applied filters when I open a bookmarked page.
> > >
> > > The bug here is (supposing the GET method is used)
> > > 1. On opening the bookmark, the page is rendered with double encoding
> (if
> > > the value had a space character initially, the space character was
> > already
> > > encoded into '+' in the URL and when this bookmark is opened, this '+'
> is
> > > again encoded).
> > > 2. Suppose the bookmarked URL had multiple values from the same filter
> > > (say, Cancelled and Declined status), it renders with just one of the
> > > statutes applied. It is because the request handler prepares a Map of
> > > parameters from the query string and as is the property of Map to
> replace
> > > the old value if a new value is being added with the same key (in this
> > > example, first Cancelled status is put in this Map and then Declined),
> > only
> > > Declined status is put in this Map.
> > >
> > > Hope, this clears the confusion. I will be happy to provide more
> > > information if needed.
> > >
> > > On Fri, Aug 24, 2018 at 

Re: Issue with opening a bookmarked page when the user is logged out

2018-08-25 Thread Girish Vasmatkar
Hi Ritesh

It does look like an issue to me.

I believe (correct me if I am wrong) it is not so much about whether GET is
appropriate here, it is more about that the framework is unable to handle
multiple request parameters with same name, which is a common case when we
talk about multiple check boxes on a form representing a single entity. The
fact that GET is doing it's job correctly when the user is logged in (means
when you change the method from POST to GET and the user is already logged
in) and not so much when the user is logged out and the request is made via
bookmark, shows that the code is not working properly.

Then, there is also an issue with URL encoding and decoding that becomes
apparent with executing your scenario. Whether it is correct to change the
form method is arguable, but the code should be able to handle it. If a
form were to be designed with GET method and the only elements present on
the form are two check boxes and a text field and if you were to select
both check boxes and have value with spaces in the text box, this scenario
would still fail.

I think the simplest approach would have been to just store query string
(request.getQueryString()) in the session attribute instead of Map (but I
think it was well pondered upon to use Map) and then just redirecting to
the saved URL once the user loges in. I did it on my local workstation and
it just worked perfectly. May be one reason why a map was used instead of
storing query string was to handle unencoded requests coming from browsers
such as IE. I may be wrong so please correct me if anyone has an idea
around this piece of code as to why Map was used instead of storing the
query string in session to be used later on.

If you can do something to fix the existing code, that would be better
approach, IMO.

May be it is not a major issue but certainly worthy of having a dedicated
JIRA for. Everybody, please chime in and provide your thoughts.

Thanks and Best regards,
Girish Vasmatkar
HotWax Systems

On Sat, Aug 25, 2018 at 8:03 PM Taher Alkhateeb 
wrote:

> Okay, I understand this issue. I don't think it is possible to
> abstract away a complex search screen with http GET method for
> bookmarks. The performFind service is quite complex and it is
> difficult to replicate the requirements using GET. GET is not designed
> to handle multiple languages, spaces, and other peculiarities that are
> needed for such a screen to work.
>
> There are multiple solutions that I can see here. One of them is
> simply to create a new entity, let's call it SearchFilter, that saves
> search parameters, which can be applied later on. Either way, you need
> to customize, your problem is not OFBiz, your problem is http GET
> limitations.
> On Fri, Aug 24, 2018 at 12:35 PM Ritesh Kumar
>  wrote:
> >
> > Using the POST method does not append form data to the URL, i.e, the
> > parameters will not be visible in the URL.
> > For example, take a Find Screen (say, FindWorkEffort) which send data
> > through a form with POST method. Apply some filters (say, status). No
> > applied filters appear in the URL.  Bookmark this page. Next time when I
> > open this bookmark, those applied filters will not be there as this page
> is
> > being rendered using data from the URL and since the applied filters were
> > not there in the bookmarked URL, this page is rendered without the
> applied
> > filters. That is why I used GET form method so that I am able to get the
> > page with applied filters when I open a bookmarked page.
> >
> > The bug here is (supposing the GET method is used)
> > 1. On opening the bookmark, the page is rendered with double encoding (if
> > the value had a space character initially, the space character was
> already
> > encoded into '+' in the URL and when this bookmark is opened, this '+' is
> > again encoded).
> > 2. Suppose the bookmarked URL had multiple values from the same filter
> > (say, Cancelled and Declined status), it renders with just one of the
> > statutes applied. It is because the request handler prepares a Map of
> > parameters from the query string and as is the property of Map to replace
> > the old value if a new value is being added with the same key (in this
> > example, first Cancelled status is put in this Map and then Declined),
> only
> > Declined status is put in this Map.
> >
> > Hope, this clears the confusion. I will be happy to provide more
> > information if needed.
> >
> > On Fri, Aug 24, 2018 at 1:46 PM Taher Alkhateeb <
> slidingfilame...@gmail.com>
> > wrote:
> >
> > > Not enough information. What happens exactly? What is the bug? What do
> you
> > > mean by it does not let us do that?
> > >
> > > On Fri, Aug 24, 2018, 11:09 AM Ritesh Kumar <
> > > ritesh.ku...@hotwaxsystems.com>
> > > wrote:
> > >
> > > > Hello Taher,
> > > >
> > > > Changing form method to GET is just to make the query parameters
> visible
> > > in
> > > > the URL so that a user is able to bookmark or share it. Using the
> POST
> > > > method 

Re: Issue with opening a bookmarked page when the user is logged out

2018-08-25 Thread Taher Alkhateeb
Okay, I understand this issue. I don't think it is possible to
abstract away a complex search screen with http GET method for
bookmarks. The performFind service is quite complex and it is
difficult to replicate the requirements using GET. GET is not designed
to handle multiple languages, spaces, and other peculiarities that are
needed for such a screen to work.

There are multiple solutions that I can see here. One of them is
simply to create a new entity, let's call it SearchFilter, that saves
search parameters, which can be applied later on. Either way, you need
to customize, your problem is not OFBiz, your problem is http GET
limitations.
On Fri, Aug 24, 2018 at 12:35 PM Ritesh Kumar
 wrote:
>
> Using the POST method does not append form data to the URL, i.e, the
> parameters will not be visible in the URL.
> For example, take a Find Screen (say, FindWorkEffort) which send data
> through a form with POST method. Apply some filters (say, status). No
> applied filters appear in the URL.  Bookmark this page. Next time when I
> open this bookmark, those applied filters will not be there as this page is
> being rendered using data from the URL and since the applied filters were
> not there in the bookmarked URL, this page is rendered without the applied
> filters. That is why I used GET form method so that I am able to get the
> page with applied filters when I open a bookmarked page.
>
> The bug here is (supposing the GET method is used)
> 1. On opening the bookmark, the page is rendered with double encoding (if
> the value had a space character initially, the space character was already
> encoded into '+' in the URL and when this bookmark is opened, this '+' is
> again encoded).
> 2. Suppose the bookmarked URL had multiple values from the same filter
> (say, Cancelled and Declined status), it renders with just one of the
> statutes applied. It is because the request handler prepares a Map of
> parameters from the query string and as is the property of Map to replace
> the old value if a new value is being added with the same key (in this
> example, first Cancelled status is put in this Map and then Declined), only
> Declined status is put in this Map.
>
> Hope, this clears the confusion. I will be happy to provide more
> information if needed.
>
> On Fri, Aug 24, 2018 at 1:46 PM Taher Alkhateeb 
> wrote:
>
> > Not enough information. What happens exactly? What is the bug? What do you
> > mean by it does not let us do that?
> >
> > On Fri, Aug 24, 2018, 11:09 AM Ritesh Kumar <
> > ritesh.ku...@hotwaxsystems.com>
> > wrote:
> >
> > > Hello Taher,
> > >
> > > Changing form method to GET is just to make the query parameters visible
> > in
> > > the URL so that a user is able to bookmark or share it. Using the POST
> > > method does not let us do that.
> > >
> > > On Fri, Aug 24, 2018 at 11:54 AM Taher Alkhateeb <
> > > slidingfilame...@gmail.com>
> > > wrote:
> > >
> > > > Why did you change the method to GET?
> > > >
> > > > On Fri, Aug 24, 2018, 9:20 AM Ritesh Kumar <
> > > ritesh.ku...@hotwaxsystems.com
> > > > >
> > > > wrote:
> > > >
> > > > > Just to put my point more clearly, let me add the steps to generate
> > the
> > > > > above-mentioned case. Please refer demo-trunk
> > > > > .
> > > > >
> > > > > 1. Open this link, FindWorkEffort
> > > > > <
> > https://demo-trunk.ofbiz.apache.org/workeffort/control/FindWorkEffort
> > > >.
> > > > > Find Work Effort screen will be rendered.
> > > > > 2. Inspect and change the form method to "GET".
> > > > > 3. Apply any of the two statuses (say, Cancelled and Declined). Click
> > > on
> > > > > Find.
> > > > > 4. Records will be fetched according to the applied filters.
> > > > > 5. Check the URL. Cancelled and Declined statuses must be there in
> > the
> > > > URL.
> > > > > 6. Bookmark this page and log out.
> > > > > 7. Now, open the bookmark.
> > > > > 8. The login page will be rendered. Check the URL here. It will be
> > the
> > > > same
> > > > > as it was when the page was being bookmarked.
> > > > > 9. Type in the credentials and log in.
> > > > > 10. The result may be different. Check the URL. One of the statuses
> > is
> > > > > gone.
> > > > >
> > > > > Due to business requirement, I need to show query parameters in the
> > URL
> > > > so
> > > > > that the user is able to bookmark the page. And, we normally pass Id
> > in
> > > > the
> > > > > parameters, but, due to some reason, I may have to pass values with
> > > space
> > > > > characters.
> > > > >
> > > > > I hope, this demo puts forth my concern.
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Aug 23, 2018 at 6:27 PM Ritesh Kumar <
> > > > > ritesh.ku...@hotwaxsystems.com>
> > > > > wrote:
> > > > >
> > > > > > Hello All,
> > > > > >
> > > > > > I faced an issue while trying to open a bookmarked page with OFBiz.
> > > > > >
> > > > > > Suppose, the URL of this bookmarked page contains a parameter with
> > > > > > multiple values and the 

Re: Old demo restarted

2018-08-25 Thread Taher Alkhateeb
I did a little bit of research and although there are many solutions
out there, the top two I shortlisted to based on many criteria
(community, plugins, eco-system, features) are zabbix and nagios, and
I list below the pros and cons from my perspective.

Given that our needs are not too complex, I find my self leaning
slightly towards zabbix.

# nagios pros
- mature and battle tested
- massive plugin collection
- highly customizable
- Configuration can be stored in a revision system (config files)
- No database, simpler

# nagios cons
- steep learning curve (everything is a config file)
- The web interface is limited
- because of the huge eco-system some plugins are abandoned or not
well maintained
- community is a bit fragmented with many forks out there (e.g. icinga, etc ...)

# zabbix pros
- Powerful web interface
- Excellent template system that makes complex flows
- Easy to deploy and configure
- Easy to learn and use
- More functionality OOTB

# zabbix cons
- More complex architecture with a database backend
- Less customizable
- Smaller community and eco-system, plugins not as numerous

On Sat, Aug 25, 2018 at 12:30 PM Jacques Le Roux
 wrote:
>
> Mind you, I already asked when the infra stopped providing it. Then Daniel 
> (Gruno) told me I could use the free tool his company provided. I used that
> for months, but it's now discontinued. So I had to find the one which suited 
> me best and I explained that at the start of this thread.
>
> The problem for me is how to share the burden and especially have more brains 
> around it. It's years I handle the demos alone...
>
> Jacques
>
> Le 25/08/2018 à 11:07, Pierre Smits a écrit :
> > Since we're talking about our demo instances on the infrastructure of the
> > ASF I suggest getting in touch with INFRA and work out a solution with them
> > that favours both parties. They surely will have monitoring solutions in
> > place and can advice on what is achievable.
> >
> >
> >
> > Best regards,
> >
> > Pierre Smits
> >
> > Apache Trafodion , Vice President
> > Apache Directory , PMC Member
> > Apache Incubator , committer
> > *Apache OFBiz , contributor (without privileges)
> > since 2008*
> > Apache Steve , committer
> >
> >
> > On Fri, Aug 24, 2018 at 4:36 PM Jacques Le Roux <
> > jacques.le.r...@les7arts.com> wrote:
> >
> >> Agreed, I have used VisualVMin the past, it's a simple and efficient tool
> >>
> >> I have planned to make a VOTE about options if needed. Let's see if it
> >> will be necessary (consensus being preferred)
> >>
> >> Jacques
> >>
> >>
> >> Le 24/08/2018 à 16:06, Girish Vasmatkar a écrit :
> >>> Speaking of monitoring tools and if we don't want to go for third party
> >>> tools, we can also use VisualVM that comes bundled with Oracle JDK. It
> >> can
> >>> connect to the remote VM (OFBiz process) and start displaying various
> >>> information.
> >>>
> >>> Very minimal configuration is needed in the form of VM argument to allow
> >>> for remote monitoring. Also, to enable further analysis of what went
> >> wrong,
> >>> why JVM crashed etc, we should also dump heap as the JVM shuts down.
> >>>
> >>> Too many ways and too many options. Probably need to reach a unanimous
> >>> decision, IMO.
> >>>
> >>> Thanks and Best regards,
> >>> Girish Vasmatkar
> >>>
> >>> On Fri, Aug 24, 2018 at 4:56 PM Jacques Le Roux <
> >>> jacques.le.r...@les7arts.com> wrote:
> >>>
>  Thanks Michael,
> 
>  Best idea so far!
> 
>  Jacques
> 
> 
>  Le 24/08/2018 à 11:08, Michael Brohl a écrit :
> > We are monitoring our OFBiz instances with JMX and self hosted Zabbix
>  [1].
> > Zabbix gives you a nice overview about the system health and metrics
>  like memory  consumption etc. It also sends out warnings (Email, SMS or
>  else)
> > if metrics are exceeded (like CPU load or memory consumption) as well
> >> as
>  the system is not accessible.
> > Looks like this: [2]
> >
> > There is no programming needed, just some configuration for JMX and
>  Zabbix.
> > [1] https://www.zabbix.com/
> > [2]
>  https://www.ecomify.de/wp-content/uploads/2018/08/Zabbix_Monitoring.png
> > If we want to see why the demos crash, it might be useful. If we only
>  want to monitor if the system is up, a simple cron job which sends a
> >> mail
> > might be enough...
> >
> > Regards,
> >
> > Michael Brohl
> > ecomify GmbH
> > www.ecomify.de
> >
> >
> > Am 24.08.18 um 10:07 schrieb Taher Alkhateeb:
> >> Okay all neat ideas, I'm not sure if the energy you will put into
>  something
> >> like this is equal to the value produced but if you want to make this
> >> happen I would be happy to assist.
> >>
> >> How much time will it take to make something like this happen? I ask
> >> because it seems 

Re: [PROPOSITION] Demos: replace old by trunk framework only

2018-08-25 Thread Nicolas Malin

On 24/08/2018 09:16, Taher Alkhateeb wrote:

Furthermore, I'm not sure we need another superman initiative in the widget
system? The price to pay for this does not seem to be worth the added
value, I would hardly call it a value but maybe I'm wrong?
I'm the feeling that it's not a mountain (less that common-theme :) ). I 
will sharing in face to face tomorrow if we have at Néréide a benefit 
for an improvement like that and if we are ready consume some time to 
create a POC to trail it.


Nicolas


Re: Old demo restarted

2018-08-25 Thread Jacques Le Roux
Mind you, I already asked when the infra stopped providing it. Then Daniel (Gruno) told me I could use the free tool his company provided. I used that 
for months, but it's now discontinued. So I had to find the one which suited me best and I explained that at the start of this thread.


The problem for me is how to share the burden and especially have more brains 
around it. It's years I handle the demos alone...

Jacques

Le 25/08/2018 à 11:07, Pierre Smits a écrit :

Since we're talking about our demo instances on the infrastructure of the
ASF I suggest getting in touch with INFRA and work out a solution with them
that favours both parties. They surely will have monitoring solutions in
place and can advice on what is achievable.



Best regards,

Pierre Smits

Apache Trafodion , Vice President
Apache Directory , PMC Member
Apache Incubator , committer
*Apache OFBiz , contributor (without privileges)
since 2008*
Apache Steve , committer


On Fri, Aug 24, 2018 at 4:36 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Agreed, I have used VisualVMin the past, it's a simple and efficient tool

I have planned to make a VOTE about options if needed. Let's see if it
will be necessary (consensus being preferred)

Jacques


Le 24/08/2018 à 16:06, Girish Vasmatkar a écrit :

Speaking of monitoring tools and if we don't want to go for third party
tools, we can also use VisualVM that comes bundled with Oracle JDK. It

can

connect to the remote VM (OFBiz process) and start displaying various
information.

Very minimal configuration is needed in the form of VM argument to allow
for remote monitoring. Also, to enable further analysis of what went

wrong,

why JVM crashed etc, we should also dump heap as the JVM shuts down.

Too many ways and too many options. Probably need to reach a unanimous
decision, IMO.

Thanks and Best regards,
Girish Vasmatkar

On Fri, Aug 24, 2018 at 4:56 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Thanks Michael,

Best idea so far!

Jacques


Le 24/08/2018 à 11:08, Michael Brohl a écrit :

We are monitoring our OFBiz instances with JMX and self hosted Zabbix

[1].

Zabbix gives you a nice overview about the system health and metrics

like memory  consumption etc. It also sends out warnings (Email, SMS or
else)

if metrics are exceeded (like CPU load or memory consumption) as well

as

the system is not accessible.

Looks like this: [2]

There is no programming needed, just some configuration for JMX and

Zabbix.

[1] https://www.zabbix.com/
[2]

https://www.ecomify.de/wp-content/uploads/2018/08/Zabbix_Monitoring.png

If we want to see why the demos crash, it might be useful. If we only

want to monitor if the system is up, a simple cron job which sends a

mail

might be enough...

Regards,

Michael Brohl
ecomify GmbH
www.ecomify.de


Am 24.08.18 um 10:07 schrieb Taher Alkhateeb:

Okay all neat ideas, I'm not sure if the energy you will put into

something

like this is equal to the value produced but if you want to make this
happen I would be happy to assist.

How much time will it take to make something like this happen? I ask
because it seems Jacques ia getting annoyed with these crashes and

we'd

like to help him out.

On Fri, Aug 24, 2018, 10:59 AM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:


Hi Taher

Please see my reply below in-line.

On Fri, Aug 24, 2018 at 12:22 PM Taher Alkhateeb <
slidingfilame...@gmail.com>
wrote:


Hi Girish, inline...

On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:


I had earlier replied to this thread but looks like the email did

not

go

through. I had leaned towards using the tool (only just) instead of

may

be

having a CRON job or an alternative.

What I feel now is that may be we can use JMX here and try to use

various

in build MBeans that provide CPU usage for the system and also for

the

JVM

process we are concerned about that is OFBiz instance. We should

also

be

able to get the memory usage of the JVM and if reaches a particular
threshold we can be notified.


Do you have a PoC for all of this?


  GV : I can have one ready; and there is going to be much doing

involved.

In addition, I think we already add a shutdown hook to the JVM

process... I

am not sure and have not used it much but may be we can use it to

send

some

notifications? Of course, it is applicable for graceful exits of

JVM

only

and if you just happen to kill the process it won't be of much

help.

The shutdown hook is used for shutting down. I'm not sure what is

the

purpose of mentioning it here?


   GV : The reason I mentioned shutdown hook was it can be used to

send

notification (may be email) or anything per our needs indicating that

the

demo process was shut down. Per my understanding, shutdown   hook

gets

called 

Re: Old demo restarted

2018-08-25 Thread Pierre Smits
Since we're talking about our demo instances on the infrastructure of the
ASF I suggest getting in touch with INFRA and work out a solution with them
that favours both parties. They surely will have monitoring solutions in
place and can advice on what is achievable.



Best regards,

Pierre Smits

Apache Trafodion , Vice President
Apache Directory , PMC Member
Apache Incubator , committer
*Apache OFBiz , contributor (without privileges)
since 2008*
Apache Steve , committer


On Fri, Aug 24, 2018 at 4:36 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Agreed, I have used VisualVMin the past, it's a simple and efficient tool
>
> I have planned to make a VOTE about options if needed. Let's see if it
> will be necessary (consensus being preferred)
>
> Jacques
>
>
> Le 24/08/2018 à 16:06, Girish Vasmatkar a écrit :
> > Speaking of monitoring tools and if we don't want to go for third party
> > tools, we can also use VisualVM that comes bundled with Oracle JDK. It
> can
> > connect to the remote VM (OFBiz process) and start displaying various
> > information.
> >
> > Very minimal configuration is needed in the form of VM argument to allow
> > for remote monitoring. Also, to enable further analysis of what went
> wrong,
> > why JVM crashed etc, we should also dump heap as the JVM shuts down.
> >
> > Too many ways and too many options. Probably need to reach a unanimous
> > decision, IMO.
> >
> > Thanks and Best regards,
> > Girish Vasmatkar
> >
> > On Fri, Aug 24, 2018 at 4:56 PM Jacques Le Roux <
> > jacques.le.r...@les7arts.com> wrote:
> >
> >> Thanks Michael,
> >>
> >> Best idea so far!
> >>
> >> Jacques
> >>
> >>
> >> Le 24/08/2018 à 11:08, Michael Brohl a écrit :
> >>> We are monitoring our OFBiz instances with JMX and self hosted Zabbix
> >> [1].
> >>> Zabbix gives you a nice overview about the system health and metrics
> >> like memory  consumption etc. It also sends out warnings (Email, SMS or
> >> else)
> >>> if metrics are exceeded (like CPU load or memory consumption) as well
> as
> >> the system is not accessible.
> >>> Looks like this: [2]
> >>>
> >>> There is no programming needed, just some configuration for JMX and
> >> Zabbix.
> >>> [1] https://www.zabbix.com/
> >>> [2]
> >> https://www.ecomify.de/wp-content/uploads/2018/08/Zabbix_Monitoring.png
> >>> If we want to see why the demos crash, it might be useful. If we only
> >> want to monitor if the system is up, a simple cron job which sends a
> mail
> >>> might be enough...
> >>>
> >>> Regards,
> >>>
> >>> Michael Brohl
> >>> ecomify GmbH
> >>> www.ecomify.de
> >>>
> >>>
> >>> Am 24.08.18 um 10:07 schrieb Taher Alkhateeb:
>  Okay all neat ideas, I'm not sure if the energy you will put into
> >> something
>  like this is equal to the value produced but if you want to make this
>  happen I would be happy to assist.
> 
>  How much time will it take to make something like this happen? I ask
>  because it seems Jacques ia getting annoyed with these crashes and
> we'd
>  like to help him out.
> 
>  On Fri, Aug 24, 2018, 10:59 AM Girish Vasmatkar <
>  girish.vasmat...@hotwaxsystems.com> wrote:
> 
> > Hi Taher
> >
> > Please see my reply below in-line.
> >
> > On Fri, Aug 24, 2018 at 12:22 PM Taher Alkhateeb <
> > slidingfilame...@gmail.com>
> > wrote:
> >
> >> Hi Girish, inline...
> >>
> >> On Thu, Aug 23, 2018, 7:25 PM Girish Vasmatkar <
> >> girish.vasmat...@hotwaxsystems.com> wrote:
> >>
> >>> I had earlier replied to this thread but looks like the email did
> not
> > go
> >>> through. I had leaned towards using the tool (only just) instead of
> >> may
> >> be
> >>> having a CRON job or an alternative.
> >>>
> >>> What I feel now is that may be we can use JMX here and try to use
> > various
> >>> in build MBeans that provide CPU usage for the system and also for
> >> the
> >> JVM
> >>> process we are concerned about that is OFBiz instance. We should
> also
> > be
> >>> able to get the memory usage of the JVM and if reaches a particular
> >>> threshold we can be notified.
> >>>
> >> Do you have a PoC for all of this?
> >>
> >  GV : I can have one ready; and there is going to be much doing
> >> involved.
> >>> In addition, I think we already add a shutdown hook to the JVM
> >> process... I
> >>> am not sure and have not used it much but may be we can use it to
> >> send
> >> some
> >>> notifications? Of course, it is applicable for graceful exits of
> JVM
> > only
> >>> and if you just happen to kill the process it won't be of much
> help.
> >>>
> >> The shutdown hook is used for shutting down. I'm not sure what is
> the
> >> purpose of mentioning it here?
> >>
> >   GV : The