[Xymon] python variables in Xymon
Jeremy Laidman
jlaidman at rebel-it.com.au
Tue Aug 25 03:08:26 CEST 2015
José
I would expect more output in your log. Are you showing all of the
logfile? For instance, in debug mode, the script sends the status message
contents to standard output (which goes to the logfile), and then sends the
bb command-line along with (again) the status message contents to standard
output. So I would expect to see everything twice, but with some extra
information the second time.
What output to do get if you run the script manually using bbcmd or
hobbitcmd to set the environment, such as:
$ /usr/lib/hobbit/client/bin/bbcmd /usr/lib/hobbit/client/ext/iface.py
--debug
This is not relevant to your problem, but I thought I'd mention it. The
errors about "invalid argument" is because ethtool cannot provide results
for "sit0" so you might want to add that interface to BLACKLIST.
Cheers
Jeremy
On 25 August 2015 at 08:45, Alvarez Aguilar José Trinidad <AAJOSE at telmex.com
> wrote:
> That's right, the original script variables iface.py Xymon are these:
>
> --------------------------------------------------
> ---------------------------------------------
>
> os.environ _cmd_line = ['BB'] + "" + os.environ ['BBDISP'] + "\" status
> "+ os.environ ['MACHINE'] +." interface "+" "+ COLOR +" "+ TIME + pStatus
> + '"'
>
>
>
> but only generates output information to the log file defined in the file:
> clientlaunch.cfg
>
>
>
> [interfaces]
>
> ENVFILE $ HOBBITCLIENTHOME / etc / hobbitclient.cfg
>
> CMD $ HOBBITCLIENTHOME / ext / iface.py --debug
>
> LOGFILE $ HOBBITCLIENTHOME / logs / interfaces.log
>
> INTERVAL 5m
>
>
>
>
>
> $ *more interfaces.log*
>
> Cannot get device settings: Invalid argument
>
> Cannot get wake-on-lan settings: Invalid argument
>
> Cannot get message level: Invalid argument
>
> Cannot get link status: Invalid argument
>
>
>
> ---------------------------------------------------------
>
> <H3>&green Interface: sit0</H3> IP: None
>
>
>
> ---------------------------------------------------------
>
> ---------------------------------------------------------
>
> <H3>&green Interface: eth0</H3> IP: 10.104.11.131
>
> &green Link detected: yes
>
> Configured speed:100
>
> Duplex: Full
>
> Supported link modes: 10baseT/Half 10baseT/Full
>
> 100baseT/Half 100baseT/Full
>
> 1000baseT/Half 1000baseT/Full
>
>
>
> Highest link mode:1000 Full
>
> &yellow Higher link mode possible for this interface
>
>
>
> ---------------------------------------------------------
>
> ---------------------------------------------------------
>
> <H3>&green Interface: lo</H3> IP: 127.0.0.1
>
> &green Link detected: yes
>
>
>
> ---------------------------------------------------------
>
>
>
> Regards.
>
>
>
>
>
> *José Trinidad Álvarez Aguilar*
>
> *Av. Epigmenio Gonzalez No. 2, Col. Parques Industriales, C:P.76150*
>
> *Santiago de Querétaro, Qro.*
>
> *Tel. 101-82-36*
>
>
>
> [image: cid:image002.jpg at 01CE728C.FAF3C270]
>
>
>
> *De:* Jeremy Laidman [mailto:jlaidman at rebel-it.com.au]
> *Enviado el:* Lunes, 24 de Agosto de 2015 05:29 p.m.
> *Para:* Alvarez Aguilar José Trinidad
> *CC:* xymon at xymon.com
> *Asunto:* Re: [Xymon] python variables in Xymon
>
>
>
> On 24 August 2015 at 11:59, Alvarez Aguilar José Trinidad <
> AAJOSE at telmex.com> wrote:
>
>
>
> os.environ command = ['BB'] + "" + os.environ ['BBDISP'] + "\" status
> "+ os.environ ['MACHINE'] +." interface "+" "+ COLOR +" "+ TIME + pStatus +
> '"'
>
>
>
> This is not the same as in the script you posted. You have /os.environ
> command = ['BB']/ instead of /command = os.environ['BB']/ and you have /+."
> interface "/ instead of /+".interface"/. Could this be why it doesn't work?
>
>
>
> Generates output information but only in the log file defined in the
> configuration file: clientlaunch.cfg
>
>
>
> Can you show the output from the logfile?
>
>
>
> Have you tried running the script with "--debug"?
>
>
>
> Cheers
>
> Jeremy
>
> *Infinitum, la mejor conexión.*
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> CONFIDENTIALITY NOTICE:
>
> This e-mail message including attachments, if any, is intended only for
> the person or entity to which it is addressed and may contain confidential
> and /or privileged material. Any review, use, disclosure or distribution of
> such confidential information without the written authorization of
> Teléfonos de México is prohibited. If you are not the intended recipient,
> please contact the sender by reply e-mail and destroy all copies of the
> original message. By receiving this e-mail you acknowledge that any breach
> by you and/or your representatives of the above provisions may entitle
> Teléfonos de México to seek for damages.
>
>
>
> AVISO DE CONFIDENCIALIDAD:
>
> Este correo electrónico, incluyendo en su caso, los archivos adjuntos al
> mismo, pueden contener información de carácter confidencial y/o
> privilegiada, y se envían a la atención única y exclusivamente de la
> persona y/o entidad a quien va dirigido. La copia, revisión, uso,
> revelación y/o distribución de dicha información confidencial sin la
> autorización por escrito de Teléfonos de México está prohibida. Si usted no
> es el destinatario a quien se dirige el presente correo, favor de contactar
> al remitente respondiendo al presente correo y eliminar el correo original
> incluyendo sus archivos, así como cualesquiera copia del mismo. Mediante la
> recepción del presente correo usted reconoce y acepta que en caso de
> incumplimiento de su parte y/o de sus representantes a los términos antes
> mencionados, Teléfonos de México tendrá derecho a los daños y perjuicios
> que esto le cause.
>
> 17:46:00 08/24/15
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150825/f687795b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1702 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150825/f687795b/attachment.jpg>
More information about the Xymon
mailing list