Add scripts to create myops-getqueryview:
[myops.git] / web / query / _attachments / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
3 <html>\r
4 \r
5 <head>\r
6 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>\r
7 <meta name="description" content="description"/>\r
8 <meta name="keywords" content="keywords"/> \r
9 <meta name="author" content="author"/> \r
10 <!--link rel="stylesheet" type="text/css" href="../../screen.css" media="screen"/-->\r
11 <!--link rel="stylesheet" href="../../style/screen.css" type="text/css"/-->\r
12 <link rel="stylesheet" href="style/sphinxdoc.css" type="text/css" />\r
13 <link rel="stylesheet" href="style/pygments.css" type="text/css" />\r
14           \r
15 <title>MyOpsQuery</title>\r
16 </head>\r
17 \r
18 <body>\r
19 \r
20         <div class="header" style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">\r
21                 <img align='right' src="images/pl-logo.png"/>\r
22                 <div class="title">\r
23                         <h1>Welcome to MyOps-Query:</h1>\r
24                         <h4>A simple collection & query interface for MyPLC deployments.</h4>\r
25                 </div>\r
26                 <div class="related">\r
27                         <ul>\r
28                         <li> <a href="index.html">Home</a> | </li>\r
29                         <!--li> <a href="index.html">About</a> </li-->\r
30                         </ul>\r
31                 </div>\r
32         </div>\r
33 \r
34                 <div class="sphinxsidebar">\r
35                         <div class="sphinxsidebarwrapper">\r
36 \r
37                         <h1>Query</h1>\r
38                         <form action="query">\r
39                         <div>\r
40                                 <input type="text" name="filter" class="styled" /> \r
41                                 <input type="hidden" name="fields" value="date,hostname" /> \r
42                                 <input type="submit" value="Run Query" class="button" />\r
43                         </div>\r
44                         </form>\r
45 \r
46                         <h1>Collected Attributes</h1>\r
47                                 <ul>\r
48                                         <li><a href="/PlanetLabConf/input.cfg">input.cfg</a></li>\r
49                                         <li>type </li>\r
50                                         <li>date </li>\r
51                                         <li>ts </li>\r
52                                         <li>hostname </li>\r
53                                         <li>boot_state </li>\r
54                                         <li>ip_internal </li>\r
55                                         <li>diskspace_root </li>\r
56                                         <li>diskspace_vservers </li>\r
57                                         <li>free_disk_root </li>\r
58                                         <li>free_inodes_root </li>\r
59                                         <li>free_disk_vservers </li>\r
60                                         <li>free_inodes_vservers </li>\r
61                                         <li>fs_status </li>\r
62                                         <li>install_date </li>\r
63                                         <li>iptables_status </li>\r
64                                         <li>kernel_version </li>\r
65                                         <li>netflow </li>\r
66                                         <li>netflow_live </li>\r
67                                         <li>nm_status </li>\r
68                                         <li>plc_config </li>\r
69                                         <li>princeton_comon_dir </li>\r
70                                         <li>princeton_comon_procs </li>\r
71                                         <li>princeton_comon_running </li>\r
72                                         <li>redundant_procs </li>\r
73                                         <li>rpmprocess_count </li>\r
74                                         <li>running_slices </li>\r
75                                         <li>uptime </li>\r
76                                         <li>uptime_idle </li>\r
77                                         <li>boot_server </li>\r
78                                         <li>bootcd_version </li>\r
79                                         <li>rpm_versions </li>\r
80                                         <li>traceroute_from_host </li>\r
81                                         <li>traceroute_to_host </li>\r
82                                         <li>hardware_system </li>\r
83                                         <li>hardware_processor </li>\r
84                                         <li>hardware_memory </li>\r
85                                         <li>hardware_disk </li>\r
86                                         <li>hardware_network </li>\r
87                                         <li>hardware_pcu </li>\r
88                                 </ul>\r
89                 </div>\r
90                 </div>\r
91 \r
92     <div class="document">\r
93             <div class="documentwrapper">\r
94                         <div class="bodywrapper">\r
95                                 <div class="body">\r
96                         <h1>Purpose</h1>\r
97                                 <p>MyOps-Query allows an operator to <em>very easily</em> define and collect new attributes of a running system, and it provides a simple <em>query interface</em> to report and select these observations.  MyOps-Query <em>complements</em> the existing and established mechanisms already running on PlanetLab, such as <a href="http://comon.cs.princeton.edu">CoMon</a> and Func().</p>\r
98                                                                             \r
99                         <h1>Example Queries</h1>\r
100                                 <p>The following are example queries that you can perform with MyOps.</p>\r
101                                 <p>Many other queries are possible by manipulating the query URL.</p>\r
102 \r
103                                   <ul>\r
104                                           <li> <a href="_list/nodelist/node-status?fields=hostname,real_bootcd_version&filter=real_bootcd_version==PlanetLab+BootCD+3.3">filter=real_bootcd_version==PlanetLab BootCD 3.3</a> </li>\r
105                                           <li> <a href="_list/nodelist/node-status?fields=real_bootcd_version,real_bootcd_kernel_version,hostname&filter=real_bootcd_version=~PlanetLab+BootCD+3%26%26real_bootcd_kernel_version=~2.6.1">filter=real_bootcd_version=~PlanetLab+BootCD+3&amp;&amp;real_bootcd_kernel_version=~2.6.1</a> </li>\r
106                                           <li> <a href="_list/nodelist/node-status?fields=hostname,free_disk_root&filter=fprobe_size%3E=5000000">filter=fprobe_size&gt;=5000000</a> </li>\r
107                                           <li> <a href="_list/nodelist/node-status?fields=date,hostname,netflow&filter=netflow==Bad">filter=netflow==Bad</a> </li>\r
108                                           <li> <a href="_list/nodelist/node-status?fields=hostname,plc_config&filter=plc_config==KO">filter=plc_config==KO</a> </li>\r
109                                           <li> <a href="_list/nodelist/node-status?fields=hostname,redundant_procs&filter=redundant_procs!=">filter=redundant_procs!=</a> </li>\r
110                                           <li> <a href="_list/nodelist/node-status?fields=hostname,rpmprocess_count&filter=rpmprocess_count>=1">filter=rpmprocess_count&gt;=1</a> </li>\r
111                                           <li> <a href="_list/nodelist/node-status?fields=hostname,free_disk_root&filter=free_disk_root<=0.2">filter=free_disk_root&lt;=0.2</a> </li>\r
112                                           <li> <a href="_list/nodelist/node-status?fields=hostname,free_disk_root&filter=free_disk_root<=0.4%26%26free_disk_root>=0.2">filter=free_disk_root&lt;=0.4&&free_disk_root&gt;=0.2</a> </li>\r
113                                           <li> <a href="_list/nodelist/node-status?fields=hostname,kernel_version&filter=kernel_version=~2.6.32">filter=kernel_version=~2.6.32</a> </li>\r
114                                           <li> <a href="_list/nodelist/node-status?fields=hostname&filter=running_slices=~princeton_comon">filter=running_slices=~princeton_comon</a> </li>\r
115                                           <li> <a href="_list/nodelist/node-status?fields=hostname&filter=rpm_versions=~fprobe-ulog-1.1.2-6.planetlab">filter=rpm_versions=~fprobe-ulog-1.1.2-6.planetlab</a> </li>\r
116                                           <li> <a href="_list/nodelist/node-status?fields=hostname,rpm_versions&rpmpattern=vsys-scripts.*">rpmpattern=vsys-scripts.*</a> </li>\r
117                                           <li> <a href="_list/rpms/rpm-to-host?group=true&startkey=[%22rpm%22]&endkey=[%22rpm%22,{}]">List RPMS per host</a> </li>\r
118                                 </ul>\r
119 \r
120 \r
121                         <h1>Supported Operators</h1>\r
122                                   <ul>\r
123                                         <li><strong>==</strong> String comparison for equivalence.</li>\r
124                                         <li><strong>!=</strong> String comparison for non-equivalence</li>\r
125                                         <li><strong>&lt;=</strong> Given a number, &lt;= converts the parameter into a number and compares it to the specified value. i.e. "root_free_disk&lt;=0.2"</li>\r
126                                         <li><strong>&gt;=</strong> Given a number, &gt;= converts the parameter into a number and compares it to the specified value. i.e. "root_free_disk&gt;=0.2"</li>\r
127                                         <li><strong>=~</strong> Given a regular expression, =~ will return rows when the attribute matches this pattern.</li>\r
128                                         <li><strong>!~</strong> Given a regular expression, !~ will return rows when the attribute does not match this pattern.</li>\r
129                                   </ul>\r
130                         <h1>Supported Conjunctions</h1>\r
131                                   <ul>\r
132                                         <li><strong>&&</strong> Logical 'and' for combining two or more simple operators.  Also, can be entered on the url as %26%26, AND, or %%.</li>\r
133                                         <li><strong>||</strong> Logical 'or'. Also can be entered\r
134                                         on the url as OR.</li>\r
135                               </ul>\r
136                         \r
137                   <h1>Supported Parameters</h1>\r
138                                   <ul>\r
139                                         <li><strong>fields</strong> a comma separated list of attribute names to report.</li>\r
140                                         <li><strong>filter </strong> a simple logic expressions for filtering which values are returned.</li> \r
141                                         <li><strong>within </strong> only return node records that have been updated in less than <strong>within</strong> seconds. (default is 3 hours (10800 sec)) </li> \r
142                                         <li><strong>skip_header </strong> do not print the attribute names as the first line.</li> \r
143                                         <li><strong>rpmpattern </strong> a pattern to match against the rpm_versions attribute. Useful for checking a single package version.</li> \r
144                                   </ul>\r
145                 </div>\r
146         </div>\r
147         </div>\r
148         </div>\r
149         \r
150 \r
151 \r
152 \r
153 <div class="footer">&copy; 2006 <a href="index.html">Website.com</a>. Valid <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> &amp; <a href="http://validator.w3.org/check?uri=referer">XHTML</a>. Template design by <a href="http://arcsin.se">Arcsin</a>\r
154 </div>\r
155 \r
156 </body>\r
157 \r
158 </html>\r