Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 673 of 807  Not logged in ELOG logo
ID Date Icon Author Author Emaildown Category OS ELOG Version Subject
  67712   Tue Nov 4 14:51:20 2014 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionLinux2.9.2Re: How to insert new entry between two entries.

Daniel Roldan wrote:

 I would like to put between two entries a new entry.

My Users forgot to put a entry, and now they would like to put a new entry between olders entries.

For Example: We have 10 entries order by Id:

300
301
302
...

They want to put between the entry 300 and 301 a new entry.

Is possible to do this feature?

Thanks! 

You are using the entry ID to sort your entries: there is no good way to insert a new entry ID, like 300.5

But you could sort your entries by other means, that allows you to insert entries later between existing entries.

I use for example a "when" attribute of type datetime. Here's an excerpt from the relevant part of my config file:

Attributes  = ..., when
Start page  = ?rsort=when
Type when   = datetime
Preset when = $date
 
This sorts automatically all your entries according to the "when" attribute. "when" will be preset to the creation date, but you can change it if the entry belongs to the past between two other entries.
If you don't create entries every second, then you'll always find a date to add entries between two old entries.
 
Be aware that you should only add new Attributes only at the end of the list, otherwise old entries without the attribute may appear mixed up.
 
Regards
Andreas
 
English (auto-detected) » English
 
  67758   Thu Jan 22 08:35:23 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll3.3Re: filter with or operation/TIME DURATION CALCULATION

 

dev wrote:

1.I HAVE A ELOG BOOK WITH TWO ATTRIBUTE 'FROM' &'TO'. I WANT TO USE A FILTER WHICH WILL SEARCH FOR A VALUE  IN BOTH ATTRIBUTE .KINDLY HELP ME.

2. HOW TO CALCULATE THE TIME DURATION  AUTOMATICALLY BASED ON TWO ATTRIBUTES 'START TIME' AND 'STOP TIME' .

1a. If you go to the "Find" form, you can add filters on several attribute. The URL of the result page can be bookmarked: this is your filter.

1b. If you define quick filters on FROM and TO, then you can enter filters on both.

2. If you start elogd with the -x option, then you can execute scripts in the "subst" and "subst on edit" commands. Within those shell scripts you can use $START TIME and $STOP TIME to calculate the attributes value. Look for the "Subst" command in the documentation.

  67764   Mon Jan 26 15:04:38 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionLinux3.0.0Re: Kerberos auth not available on 3.0 ?
Hi Maikolk,
I have elogd 3.0 running with kerberos: I had no problems with that.
Maybe you forgot to change the Makefile before compiling?
Uncomment line 28 to:

# flag for Kerberos support, please turn on if you need Kerberos
USE_KRB5   = 1

and then "make clean" and "make install" (or "make update").

Regards, Andreas

Maikolk Kein wrote:
Hi all !!!
i have just updated and 2.9.2-1 elog instance, and i have problems with the kerberos configuration.
I was surprised to see on the logs, that the 3.0 daemon was refusing to start because the system
config has kerberos listed as an authentication method. I saw on the logs that the current daemon
didnt have kerberos support compiled in.
Ive seen that there is ldap support, but couldnt find anything about configuring this auth sytem, does
amnyone have any example i could check ?
Did i have to use a patched version ? or compile it on my own ?
Regards

 

  67767   Mon Jan 26 15:56:41 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll3.3Re: calculate the value of one attribute depending upon the value of other attribute.

If you have the following elogd.cfg:

Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END

And the shell script /usr/local/elog/diff.sh is:

#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d

Then DURATION is calculated from START and END in full hours.

It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?

dev wrote:

I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.

PS: Please do NOT write all capital text in a forum. Thank you!

  67770   Tue Jan 27 15:59:59 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll3.3Re: calculate the value of one attribute depending upon the value of other attribute.

Yes, I forgot to mention that you need to enable shell script execution by starting the server with "elogd -x".

Before you start elogd from the command line you need to shutdown any running elogd; otherwise the port is blocked and the command line elogd cannot start: "sudo /sbin/service elogd stop"

From Linux you can edit instead /etc/init.d/elogd and add there the option "-x" to the line where "elogd" is started and then restart the service: "sudo /sbin/service elogd restart".

dev wrote:

I tried that It is not calculating  and it is giving the error "Shell execution not enabled via -x flag ".I started elogd -x from command prompt  it still gives the same error.

Andreas Luedeke wrote:

If you have the following elogd.cfg:

Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END

And the shell script /usr/local/elog/diff.sh is:

#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d

Then DURATION is calculated from START and END in full hours.

It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?

dev wrote:

I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.

PS: Please do NOT write all capital text in a forum. Thank you!

 

 

  67774   Wed Jan 28 09:57:11 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll3.3Re: calculate the value of one attribute depending upon the value of other attribute.

Unfortunately I cannot help you with Windows. But you must have started the service somehow in the first place: that is where I would expect you can stop it as well.

dev wrote:

I am working in window system.Itries using elogd  stop and start  command  but it is always showing it is running.Kindly help  me  thanking you.

Andreas Luedeke wrote:

Yes, I forgot to mention that you need to enable shell script execution by starting the server with "elogd -x".

Before you start elogd from the command line you need to shutdown any running elogd; otherwise the port is blocked and the command line elogd cannot start: "sudo /sbin/service elogd stop"

From Linux you can edit instead /etc/init.d/elogd and add there the option "-x" to the line where "elogd" is started and then restart the service: "sudo /sbin/service elogd restart".

dev wrote:

I tried that It is not calculating  and it is giving the error "Shell execution not enabled via -x flag ".I started elogd -x from command prompt  it still gives the same error.

Andreas Luedeke wrote:

If you have the following elogd.cfg:

Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END

And the shell script /usr/local/elog/diff.sh is:

#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d

Then DURATION is calculated from START and END in full hours.

It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?

dev wrote:

I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.

PS: Please do NOT write all capital text in a forum. Thank you!

 

 

 

 

  67789   Thu Jan 29 14:20:13 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionWindows3.0.0Re: SMTP Host Error and export to CSV question

If you have more than one topic it is better to do more than one post.

I did not understand your first question. You should not have a line "SMTP host= " if you don't want to send any email. Have you tried "Suppress Email to users=1" to get rid of the error message?

If you export in cvs format, then it is the correct behaviour that multiple lines of text in the body are put into quotation marks and printed as multiple lines in the output. Every spreadsheet program (Excel, Openoffice, Libreoffice, ...) should be able to read that into a table. I've tested it, it works fine. If you have a problem, then you'll need to attach your elogd.cfg file and the exported file in the forum and some screenshots of what your MS Excel does with it.

Banata Wachid Ridwan wrote:

Hello

first of all, congrats for bring back the forum after down for sometimes, :D

but seems my old account is broken, I cant login with that anymore, so I make new account and strangely I can make identical account like the old one ahahahaha

 

okay first question :

Recently my elog setup got smtp host error, everytime someone submit log, error result that SMTP host is not found in global setting.

I dont't set mail server on my server so I cant use smtp host function, and I use register type 1 to avoid email function, but after sometimes those error occured, it seems some members accidentally check ëmail notification option

so, how to completely disable this function or maybe some work around on this error? I dont have mail server right now,

 

second

When we export logbook to CSV and open to microsoft excel, html tags still there, how to ommit html tags completely during export? and how to make nice table data from csv in elog? I saw many inconsistency there, especially on comment data

for example if I make more than two lines of logbook, second line will place in first column , not in the last column, just like the first line of comment.

 

  67794   Mon Feb 2 10:13:58 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionWindows3.0.0Re: SMTP Host Error

You need to specify "Suppress Email to users=1" in the [global] section of the configuration. And it does matter if the letters are capitalized on not.

Banata Wachid Ridwan wrote:

sorry for may bad english, not my natives :D

for first question, I'll make it clear,

after sometimes running elog, suddenly SMTP host error occured.

I dont have SMTP host= on my configuration, but that error keep show up.

how to disable email notification completely for my elog? or at least how to disable those SMTP Host error?

I'll try supress email users =1 to my elog.cfg and error still exist. where I should place supress email users flag to make it works?

on the picture attached, it is said there is no smtp host defined in global setting.

could it be because members check automatic email notification on their setting?

 

for second question I'll attach my csv file, and you will see <p> </p> tags still there, and inconsistency when open it to ms excel (see picture)

you can see that portion of text file (second line of text file and soon, placed in "id pesan")

 

please help us.

 

Andreas Luedeke wrote:

If you have more than one topic it is better to do more than one post.

I did not understand your first question. You should not have a line "SMTP host= " if you don't want to send any email. Have you tried "Suppress Email to users=1" to get rid of the error message?

If you export in cvs format, then it is the correct behaviour that multiple lines of text in the body are put into quotation marks and printed as multiple lines in the output. Every spreadsheet program (Excel, Openoffice, Libreoffice, ...) should be able to read that into a table. I've tested it, it works fine. If you have a problem, then you'll need to attach your elogd.cfg file and the exported file in the forum and some screenshots of what your MS Excel does with it.

Banata Wachid Ridwan wrote:

Hello

first of all, congrats for bring back the forum after down for sometimes, :D

but seems my old account is broken, I cant login with that anymore, so I make new account and strangely I can make identical account like the old one ahahahaha

 

okay first question :

Recently my elog setup got smtp host error, everytime someone submit log, error result that SMTP host is not found in global setting.

I dont't set mail server on my server so I cant use smtp host function, and I use register type 1 to avoid email function, but after sometimes those error occured, it seems some members accidentally check ëmail notification option

so, how to completely disable this function or maybe some work around on this error? I dont have mail server right now,

 

second

When we export logbook to CSV and open to microsoft excel, html tags still there, how to ommit html tags completely during export? and how to make nice table data from csv in elog? I saw many inconsistency there, especially on comment data

for example if I make more than two lines of logbook, second line will place in first column , not in the last column, just like the first line of comment.

 

 

 

ELOG V3.1.5-3fb85fa6