Not entirely sure why, but the mailing list is stripping out parts of my included script around @data making it inoperable.
Please excuse the appearance. ----- Forwarded by Greg Procunier/TOR/SYM on 07/27/2011 05:08 PM ----- From: Greg Procunier/TOR/SYM To: [email protected] Date: 07/27/2011 04:19 PM Subject: Generic Program with "multiple data" points Hello, Is it possible to have multiple data categories and data points in a "Generic Program with Data" probe similar to the built in "Linux: TCP Connections by State" ? For example: I wrote the following perl script to extract read IO/s from monitored hosts into data points: --SNIP-- #!/usr/bin/perl open(IOSTAT,"-|","/usr/bin/iostat -xtd sda 15 2") or die; @collect = <IOSTAT>; close IOSTAT; @collect = grep {!/^$/} @collect; @data = split(/\s+/,$collect[-1]); $read_ops = $data[3]; print "<perldata> <hash> <item key=\"data\">$read_ops</item> <item key=\"Read Ops\"> </item> </hash> </perldata>"; --SNIP-- Converted here into a "Generic Program with Data" probe (1 liner) --SNIP-- /usr/bin/perl -e 'open(IOSTAT,"-|","/usr/bin/iostat -xtd sda 15 2") or die;@collect = <IOSTAT>;close IOSTAT;@colle ct = grep {!/^$/} @collect;@data = split(/\s+/,$collect[-1]);$read_ops = $data[3];print "<perldata> <hash> <item k ey=\"data\">$read_ops</item> <item key=\"Read Ops\"> </item> </hash> </perldata>";' --SNIP-- What I would like to do is create more data points out of different streams of data from the -1- probe. In my script the iostat output captured in @data has read io/s as element [3], while write io/s are captured in element [4] (etc). Going back to my reference to the Linux: TCP connections by State probe; in that you can specify multiple data point sources: eg, ESTABLISHED, TIME_WAIT, SYN_RECV etc. This would be preferred as then I could process all the data from the iostat probe and create very powerful reports. I just dont know if that is possible as my current experiments have yielded no success.
CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. AVERTISSEMENT RELATIF À LA CONFIDENTIALITÉ Ce message, ainsi que les pièces qui y sont jointes, est destiné à l’usage exclusif de la personne à laquelle il s’adresse et peut contenir de l’information personnelle ou confidentielle. Si le lecteur de ce message n’en est pas le destinataire, nous l’avisons par la présente que toute diffusion, distribution, reproduction ou utilisation de son contenu est strictement interdite. Veuillez avertir sur-le-champ l’expéditeur par retour de courrier électronique et supprimez ce message ainsi que toutes les pièces jointes.
_______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
