Re: [Spacewalk-list] Generic Program with "multiple data" points
On 07/27/2011 10:19 PM, gprocun...@symcor.com wrote: > 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" ? I discuss it with Greg on IRC. Other may find some information useful: [15:50] <__greg__> the issue I am running into is that a command like iostat returns many data points, however with the documented Generic Program With Data it looks like only 1 of those points can be captured [15:51] <__greg__> unless you know another way [15:51] <__greg__> as it is i need to create two probes (instances of iostat) to capture Read IOPs and Write IOPs [15:51] <__greg__> which is highly ineficient [15:51] <__greg__> *efficient [15:52] <__greg__> it would be great if you could [15:52] <__greg__> or [15:53] <__greg__> handle multiple 's within 1 [15:53] http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/5.4.1/html/Reference_Guide/sect-Reference_Guide-Probes-General.html#sect-Reference_Guide-General-GeneralRemote_Program_with_Data [15:53] you can have more item in one hash [15:54] I'm not sure if you can have more then one hash [15:54] <__greg__> well [15:54] <__greg__> that shows that you can have more then 1 [15:54] <__greg__> but what about mor ethen one item key="data" [15:54] that is probably not possiblem [15:54] <__greg__> Ideally i would like to emulate what the Linux: TCP Connections by State does [15:55] <__greg__> which is very advanced [15:55] <__greg__> plotting multiple data points [15:55] <__greg__> and configurable data streams [15:55] <__greg__> then we could just make the IOSTAT probe [15:55] <__greg__> and let users pick which of the 15 fields it records give [15:56] <__greg__> do you see where I am coming from ? [15:56] well you can always create new probe, which should be quite easy [15:57] <__greg__> i havent looked at how to integrate custom probes [15:57] you just write new .pm module - you can get idea from those existing modules [15:57] <__greg__> how do they show up in the probe list [15:57] and then insert one record into db [15:57] hmm we can even have some readme about that [15:57] let me look around [15:58] <__greg__> thanks [16:02] see monitoring/PerlModules/NP/Probe/Overview.pod in our git repo [16:02] <__greg__> do you have a url ? [16:02] <__greg__> for the repo [16:02] https://fedorahosted.org/spacewalk/browser [16:03] <__greg__> thanks [16:03] https://fedorahosted.org/spacewalk/wiki/GitGuide [16:04] then check: schema/spacewalk/common/data/rhn_command.sql for example how to appear in db [16:04] err in webui [16:06] and schema/spacewalk/common/data/rhn_metrics.sql and schema/spacewalk/common/data/rhn_command_parameter.sql and schema/spacewalk/common/data/rhn_command_param_threshold.sql [16:06] if you want to tune up the tresholds, metrics or parameters -- Miroslav Suchy Red Hat Satellite Engineering ___ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list
Re: [Spacewalk-list] Generic Program with "multiple data" points
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: spacewalk-list@redhat.com 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 = ; close IOSTAT; @collect = grep {!/^$/} @collect; @data = split(/\s+/,$collect[-1]); $read_ops = $data[3]; print " $read_ops"; --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 = ;close IOSTAT;@colle ct = grep {!/^$/} @collect;@data = split(/\s+/,$collect[-1]);$read_ops = $data[3];print " $read_ops ";' --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 Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list
[Spacewalk-list] 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 = ; close IOSTAT; @collect = grep {!/^$/} @collect; @data = split(/\s+/,$collect[-1]); $read_ops = $data[3]; print " $read_ops"; --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 = ;close IOSTAT;@colle ct = grep {!/^$/} @collect;@data = split(/\s+/,$collect[-1]);$read_ops = $data[3];print " $read_ops ";' --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 Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list