Re: Logging entries from the command line, posted by kenzo Abrahams on Mon Oct 26 11:24:46 2015
|
Hi Stephan
The error message I get is "Error: Command Submit not allowed". I dont know if this might be an issue but it says Response Recieved: HTTP/1.1 404 Not Found in the first line of the servers response
Stefan Ritt wrote: |
Run the elog command with an additional -v flag (verbose output), and you will see what the elogd server return. It's HTML, but you should be able to see some error message.
kenzo Abrahams wrote: |
Good Afternoon
Im trying to automatically post an entry using information saved in a text file. I have followed the example in the users guide but i always seem to get a error message saying transmission failed. Lets say for instance I have a user named John and his password is Blue and he wants to log into a logbook called home from a textfile the command im using to log a message from the file is
elog -h localhost -p 8080 -u John Blue -l home -a Author=John -m textfile
I cant seem to figure out why i keep getting this error message. I even tried deleting the password file because i thought it might be an authentication issue.
Can anybody assist me please it would be much appreciated.
Regards
|
|
|
Re: Logging entries from the command line, posted by kenzo Abrahams on Mon Oct 26 12:17:40 2015
|
Yes I can it works perfectly from the browser.
Stefan Ritt wrote: |
This indicates that the username/password is not correct. Can you log in to that logbook in your browser with the username "John" and password "Blue"?
kenzo Abrahams wrote: |
Hi Stephan
The error message I get is "Error: Command Submit not allowed". I dont know if this might be an issue but it says Response Recieved: HTTP/1.1 404 Not Found in the first line of the servers response
Stefan Ritt wrote: |
Run the elog command with an additional -v flag (verbose output), and you will see what the elogd server return. It's HTML, but you should be able to see some error message.
kenzo Abrahams wrote: |
Good Afternoon
Im trying to automatically post an entry using information saved in a text file. I have followed the example in the users guide but i always seem to get a error message saying transmission failed. Lets say for instance I have a user named John and his password is Blue and he wants to log into a logbook called home from a textfile the command im using to log a message from the file is
elog -h localhost -p 8080 -u John Blue -l home -a Author=John -m textfile
I cant seem to figure out why i keep getting this error message. I even tried deleting the password file because i thought it might be an authentication issue.
Can anybody assist me please it would be much appreciated.
Regards
|
|
|
|
|
Re: Logging entries from the command line, posted by kenzo Abrahams on Mon Oct 26 12:26:03 2015
|
Hi Stephan I got it to work for some reason elog was complaining that my encoding of the message wasnt allowed. I allowed the lognook to allow ELcode and it works perfectly.
Thank you for the help.
kenzo Abrahams wrote: |
Yes I can it works perfectly from the browser.
Stefan Ritt wrote: |
This indicates that the username/password is not correct. Can you log in to that logbook in your browser with the username "John" and password "Blue"?
kenzo Abrahams wrote: |
Hi Stephan
The error message I get is "Error: Command Submit not allowed". I dont know if this might be an issue but it says Response Recieved: HTTP/1.1 404 Not Found in the first line of the servers response
Stefan Ritt wrote: |
Run the elog command with an additional -v flag (verbose output), and you will see what the elogd server return. It's HTML, but you should be able to see some error message.
kenzo Abrahams wrote: |
Good Afternoon
Im trying to automatically post an entry using information saved in a text file. I have followed the example in the users guide but i always seem to get a error message saying transmission failed. Lets say for instance I have a user named John and his password is Blue and he wants to log into a logbook called home from a textfile the command im using to log a message from the file is
elog -h localhost -p 8080 -u John Blue -l home -a Author=John -m textfile
I cant seem to figure out why i keep getting this error message. I even tried deleting the password file because i thought it might be an authentication issue.
Can anybody assist me please it would be much appreciated.
Regards
|
|
|
|
|
|
running more then one shell command when new entries is submitted, posted by kenzo Abrahams on Tue Oct 27 11:03:49 2015
|
Hi
Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.
I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.
Regards
Kenzo |
Re: running more then one shell command when new entries is submitted, posted by kenzo Abrahams on Tue Oct 27 11:14:16 2015
|
The reason why im asking if it can be done using the Execute option is because I need to have the message id of the entry that was submitted and in an external script i dont have access to the variable
kenzo Abrahams wrote: |
Hi
Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.
I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.
Regards
Kenzo
|
|
Re: running more then one shell command when new entries is submitted, posted by kenzo Abrahams on Tue Oct 27 11:23:36 2015
|
If i put the ';' into Execute the rest of the command becomes a comment thats why i was trying to use '&&' instead. If I encapulate the whole command in "" or '' then both commands are executed but the files im trying to write to gets created but no data is piped into it. When I use Execute with one command and pipe its output to a file everything works fine though.
Stefan Ritt wrote: |
The command is passed to your shell, and some shells except more than one command. Most Linux shells accept commands separated by ';', which you can try yourself by entering for example: ls *.c; ls*.h
kenzo Abrahams wrote: |
Hi
Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.
I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.
Regards
Kenzo
|
|
|
Re: running more then one shell command when new entries is submitted, posted by kenzo Abrahams on Wed Oct 28 11:11:27 2015
|
Hi Andreas
This worked perfectly thank you.
Andreas Luedeke wrote: |
As far as I know ELOG is recognising a configuration line as a comment only when it starts with a ';'.
I can assure you that ELOG does not treat the rest of the line as a comment when you use a ';' within a $shell() command: I do it a lot and it works fine. Here's a simple, generic example using the bash:
Preset Author = $shell(if [ $short_name = "Anonym" ] ;then echo $Author;else echo \"$long_name, $Author\";fi)
It adds $long_name to the Author field for non-anonymous entries.
Cheers Andreas
kenzo Abrahams wrote: |
If i put the ';' into Execute the rest of the command becomes a comment thats why i was trying to use '&&' instead. If I encapulate the whole command in "" or '' then both commands are executed but the files im trying to write to gets created but no data is piped into it. When I use Execute with one command and pipe its output to a file everything works fine though.
Stefan Ritt wrote: |
The command is passed to your shell, and some shells except more than one command. Most Linux shells accept commands separated by ';', which you can try yourself by entering for example: ls *.c; ls*.h
kenzo Abrahams wrote: |
Hi
Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.
I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.
Regards
Kenzo
|
|
|
|
|
propogating messages through logbooks, posted by kenzo Abrahams on Thu Oct 29 12:30:43 2015
|
Hi there
Okay so let me explain what im trying to do. I have a table in a logbook (lets call it home) that the user fills
out. This information in the table is related to other logbooks (8 of them to be exact).
I want to propogate information from the table in the home logbook into the other logbooks. To do this I used
Execute new which runs my scripts. One of the scripts makes a call to the elog
client to submit the message. The problem is that this call to elog client never finishes because its hanging
waiting for the initial submit (one which triggered Execute new) to finish. The documentation
explained that only one submit can be processed at a time so i expected whats happening at the moment.
My question is are there any other ways to do what im trying to do?? In a nutshell how to propogate information
from one logbook to another autonomously.
Regards
Kenzo |