[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Feature request: Open XDMoD PHP plugin for HTCondor log ingestion



Thank you all for the suggestions.
I will post updates when available.

Regards



On Fri, 2021-09-10 at 22:55 +0000, John M Knoeller wrote:
For what it's worth:  lines in the Condor log files have the pattern

<time>  [<tags>] <message>

the format of the <time> is configurable, if you control the configuration you might want to set D_TIMESTAMP to have time values printed as unix timestamps rather than as human-readable localtime.

<tags> may or may not exist depending on configuration,  if they exist it there will be one or more values each enclosed in parens ().  Configuration flags that enable tags include D_CAT D_PID and D_FDS .  For example, this is a message from the ShadowLog with 3 tags,  a category tag (D_ALWAYS),  the job id (1602.1), and the shadow pid (35701)

03/31/20 17:43:53.774 (D_ALWAYS) (1602.1) (35700): Job 1602.1 is being evicted from slot1@xxxxx

The above example is showing time in milliseconds, by default time is only shown in whole seconds.  configure D_SUB_SECOND to enable that millisecond display.

the <message> usually ends in a newline, but when the logging is set to a verbose mode some messages will span multiple lines.  The multi-line messages are usually classads, but not always.  Treat everything until the next <time> as a single message. 

hope this helps.
-tj


From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Mark Coatsworth <coatsworth@xxxxxxxxxxx>
Sent: Friday, September 10, 2021 4:56 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Feature request: Open XDMoD PHP plugin for HTCondor log ingestion
 
Hi Valerio,

I agree with Matt's suggestion: the best way to do this is to set up a
local HTCondor instance so you can work with real log files that are
specific to your system.

>From there, you can locate the log files by shelling the
condor_config_val tool. I'm not too familiar with PHP but something
like the following should work:

$log_dir = shell_exec('condor_config_val LOG')

At this point there are many ways to ingest the log files. The APIs we
provide for reading log files are written in Python so these won't
help you unfortunately. You'll need to use whatever PHP file reading
tools are available to read in the log files, parse them if necessary,
then store them in data objects. I'm not sure how XDMoD works but you
should be able to use the Slurm plugin you provided as a template.

Hope this helps,

Mark

On Fri, Sep 10, 2021 at 11:30 AM Valerio Bellizzomi <valerio@xxxxxxxxxx> wrote:
>
> On Fri, 2021-09-10 at 16:15 +0000, West, Matthew wrote:
> > Hi Valerio,
> >
> > If you don't have an HTCondor system yourself to work on, I would
> > recommend spinning up a single-node instance with Docker:
> > https://hub.docker.com/u/htcondor. The python binding tutorials
> > https://htcondor.readthedocs.io/en/latest/apis/python-bindings/tutorials/index.html
> >  will have a bunch of examples that give you log files to work with.
> >
> > Is this what you were looking for?
> >
> > Cheers,
> > Matt
>
> Approximately yes. Open XDMoD has PHP plugins, but I think it can
> ingest HTCondor logs directly. Let me see if example logs are
> sufficient.
>
> Thank you.
>
> Regards
>
>
>
> >
> > -----Original Message-----
> > From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf
> > Of Valerio Bellizzomi
> > Sent: 10 September 2021 05:05 PM
> > To: htcondor-users@xxxxxxxxxxx
> > Subject: Re: [HTCondor-users] Feature request: Open XDMoD PHP plugin
> > for HTCondor log ingestion
> >
> > CAUTION: This email originated from outside of the organisation. Do
> > not click links or open attachments unless you recognise the sender
> > and know the content is safe.
> >
> >
> > Greetings,
> > is there a place where I can find example HTCondor logs?
> > We need logs to examine in order to develop a plugin for Open XDMoD.
> >
> > Regards.
> >
> >
> >
> >
> > On Mon, 2021-08-09 at 17:55 +0200, Valerio Bellizzomi wrote:
> > > Hi Mark,
> > >
> > > the best match for a template is the xdmod-slurm-helper PHP script
> > > which allows xdmod to ingest Slurm logs:
> > >
> > > https://eur03.safelinks.protection.outlook.com/?url="">
> > > ub.com%2Fubccr%2Fxdmod%2Fblob%2Fecddb3cac633414ca53371746febd8bb091
> > > 753
> > > 93%2Fbin%2Fxdmod-slurm-
> > > helper&amp;data=""> > > > uk%7Cee4cbdfaec30465cdc1208d9747554ac%7C912a5d77fb984eeeaf321334d8f
> > > 04a
> > > 53%7C0%7C0%7C637668869664735589%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4
> > > wLj
> > > AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sda
> > > ta=
> > > Li4Sn8IMvMspnHDGytHWiDGCZWWqjS%2FQySuJPPrIYSQ%3D&amp;reserved=0
> > >
> > > Valerio
> > >
> > >
> > >
> > > On Mon, 2021-08-09 at 10:23 -0500, Mark Coatsworth wrote:
> > > > Hi Valerio,
> > > >
> > > > We don't have any PHP plugins on our development roadmap
> > > > unfortunately. We've been focusing our efforts on Python
> > > > bindings
> > > > which is what the vast majority of people are using for their
> > > > frontend interfaces.
> > > >
> > > > If you can point me towards the source code for a XDMoD plugin
> > > > template, I might be able to give suggestions about how to write
> > > > a
> > > > plugin that does what you're looking for.
> > > >
> > > > Mark
> > > >
> > > > On Mon, Aug 9, 2021 at 3:33 AM Valerio Bellizzomi <
> > > > valerio@xxxxxxxxxx
> > > > > wrote:
> > > > > We would really like an HTCondor PHP plugin for Open XDMoD (
> > > > >
https://eur03.safelinks.protection.outlook.com/?url="">
> > > > > open.xdmod.org%2F9.5%2F&amp;data=""> > > > > > .uk%7Cee4cbdfaec30465cdc1208d9747554ac%7C912a5d77fb984eeeaf3213
> > > > > 34d8f04a53%7C0%7C0%7C637668869664745541%7CUnknown%7CTWFpbGZsb3d
> > > > > 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn
> > > > > 0%3D%7C3000&amp;sdata=Qcx1DMourjlwb6poRHGzZbLVre6%2B9kiy7L1JJoq
> > > > > 8Opw%3D&amp;reserved=0). The plugin would allow XDMoD to ingest
> > > > > HTCondor logs.
> > > > >
> > > > > Regards.
> > > > >
> > > > > --
> > > > > Valerio Bellizzomi
> > > > >
https://eur03.safelinks.protection.outlook.com/?url="">
> > > > >
www.selroc.systems%2F&amp;data="">
> > > > > Cee4cbdfaec30465cdc1208d9747554ac%7C912a5d77fb984eeeaf321334d8f
> > > > > 04a
> > > > > 53%7C0%7C0%7C637668869664745541%7CUnknown%7CTWFpbGZsb3d8eyJWIjo
> > > > > iMC
> > > > > 4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000
> > > > > &am
> > > > > p;sdata=nMVeYqdCuzHblLbfy9HC7TN%2FSmVDZvTaQP5puGb2WtA%3D&amp;re
> > > > > ser
> > > > > ved=0
> > > > >
https://eur03.safelinks.protection.outlook.com/?url="">
> > > > > ww.selnet.org%2F&amp;data=""> > > > > > e4c
> > > > > bdfaec30465cdc1208d9747554ac%7C912a5d77fb984eeeaf321334d8f04a53
> > > > > %7C
> > > > > 0%7C0%7C637668869664745541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> > > > > LjA
> > > > > wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;
> > > > > sda
> > > > > ta=TX8C5KHjRIRNurGDbbnMkfrJet2wBa2Ydj7ZnjTBcFI%3D&amp;reserved=
> > > > > 0
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > HTCondor-users mailing list
> > > > > To unsubscribe, send a message to
> > > > > htcondor-users-request@xxxxxxxxxxx with a
> > > > > subject: Unsubscribe
> > > > > You can also unsubscribe by visiting
> > > > >
https://eur03.safelinks.protection.outlook.com/?url="">
> > > > > lists.cs.wisc.edu%2Fmailman%2Flistinfo%2Fhtcondor-
> > > > > users&amp;data=""> > > > > > 4%7C01%7CM.T.West%40exeter.ac.uk%7Cee4cbdfaec30465cdc1208d97475
> > > > > 54a
> > > > > c%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C6376688696647455
> > > > > 41%
> > > > > 7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJ
> > > > > BTi
> > > > > I6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=mNomdBKp3cqwXmK1xyQzJ
> > > > > T9F
> > > > > K%2BcNqCk89FCSg4QzghA%3D&amp;reserved=0
> > > > >
> > > > > The archives can be found at:
> > > > >
https://eur03.safelinks.protection.outlook.com/?url="">
> > > > > lists.cs.wisc.edu%2Farchive%2Fhtcondor-
> > > > > users%2F&amp;data=""> > > > > > CM.T.West%40exeter.ac.uk%7Cee4cbdfaec30465cdc1208d9747554ac%7C9
> > > > > 12a
> > > > > 5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C637668869664745541%7CUnk
> > > > > now
> > > > > n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1
> > > > > haW
> > > > > wiLCJXVCI6Mn0%3D%7C3000&amp;sdata=81i4WAMjaEKhVnXpoucQ8w0xoWFKt
> > > > > 74J
> > > > > H%2BSwFv%2Bs7dg%3D&amp;reserved=0
> > >
> > > _______________________________________________
> > > HTCondor-users mailing list
> > > To unsubscribe, send a message to
> > > htcondor-users-request@xxxxxxxxxxx
> > > with a
> > > subject: Unsubscribe
> > > You can also unsubscribe by visiting
> > >
https://eur03.safelinks.protection.outlook.com/?url="">
> > > s.cs.wisc.edu%2Fmailman%2Flistinfo%2Fhtcondor-
> > > users&amp;data=""> > > > CM.T.West%40exeter.ac.uk%7Cee4cbdfaec30465cdc1208d9747554ac%7C912a5
> > > d77
> > > fb984eeeaf321334d8f04a53%7C0%7C0%7C637668869664745541%7CUnknown%7CT
> > > WFp
> > > bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
> > > 6Mn
> > > 0%3D%7C3000&amp;sdata=mNomdBKp3cqwXmK1xyQzJT9FK%2BcNqCk89FCSg4QzghA
> > > %3D
> > > &amp;reserved=0
> > >
> > > The archives can be found at:
> > >
https://eur03.safelinks.protection.outlook.com/?url="">
> > > s.cs.wisc.edu%2Farchive%2Fhtcondor-
> > > users%2F&amp;data=""> > > > t%40exeter.ac.uk%7Cee4cbdfaec30465cdc1208d9747554ac%7C912a5d77fb984
> > > eee
> > > af321334d8f04a53%7C0%7C0%7C637668869664745541%7CUnknown%7CTWFpbGZsb
> > > 3d8
> > > eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> > > 7C3
> > > 000&amp;sdata=81i4WAMjaEKhVnXpoucQ8w0xoWFKt74JH%2BSwFv%2Bs7dg%3D&am
> > > p;r
> > > eserved=0
> >
> > _______________________________________________
> > HTCondor-users mailing list
> > To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx
> > with a
> > subject: Unsubscribe
> > You can also unsubscribe by visiting
> >
https://eur03.safelinks.protection.outlook.com/?url="">
> >
> > The archives can be found at:
> >
https://eur03.safelinks.protection.outlook.com/?url="">
> >
> > _______________________________________________
> > HTCondor-users mailing list
> > To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx
> > with a
> > subject: Unsubscribe
> > You can also unsubscribe by visiting
> >
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> >
> > The archives can be found at:
> > https://lists.cs.wisc.edu/archive/htcondor-users/
>
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/



_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to 
htcondor-users-request@xxxxxxxxxxx
 with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users


The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/