blob: 433589b83fb34cdb9c46b85583d1be4e6ab0f491 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:include href="xsl-transform-includes/text-templates.xsl" />
<xsl:output method="xml" indent="no" media-type="text/xml" omit-xml-declaration="yes"/>
<xsl:template match="Report">
<item>
<pubDate><xsl:value-of select="@time" /></pubDate>
<title>BCFG Nightly Statistics</title>
<description><pre>
Report Run @ <xsl:value-of select="@time" />
<xsl:variable name="cleannodes" select="/Report/Node[count(Statistics/Good)>0]"/>
<xsl:variable name="dirtynodes" select="/Report/Node[count(Statistics/Bad)>0]"/>
<xsl:variable name="modifiednodes" select="/Report/Node[count(Statistics/Modified)>0]"/>
<xsl:variable name="stalenodes" select="/Report/Node[count(Statistics/Stale)>0]"/>
<xsl:variable name="unpingablenodes" select="/Report/Node[HostInfo/@pingable='N']"/>
<xsl:variable name="pingablenodes" select="/Report/Node[HostInfo/@pingable='Y']"/>
Summary:
<xsl:text> </xsl:text><xsl:value-of select="count($cleannodes)" /> nodes are clean.
<xsl:text> </xsl:text><xsl:value-of select="count($dirtynodes)" /> nodes are dirty.
<xsl:text> </xsl:text><xsl:value-of select="count($modifiednodes)" /> nodes were modified in the last run. (includes both good and bad nodes)
<xsl:text> </xsl:text><xsl:value-of select="count($stalenodes[count(.|$pingablenodes)= count($pingablenodes)])" /> nodes did not run this calendar day but were pingable.
<xsl:text> </xsl:text><xsl:value-of select="count($unpingablenodes)" /> nodes were not pingable.
<xsl:text> </xsl:text>----------------------------
<xsl:text> </xsl:text><xsl:value-of select="count(/Report/Node)" /> Total<xsl:text>
</xsl:text>
<xsl:if test="count($cleannodes) > 0">
CLEAN:
<xsl:for-each select="Node">
<xsl:sort select="HostInfo/@fqdn"/>
<xsl:if test="count(Statistics/Good) > 0">
<xsl:text> </xsl:text><xsl:value-of select="HostInfo/@fqdn" /><xsl:text>
</xsl:text>
</xsl:if>
</xsl:for-each><xsl:text>
</xsl:text>
</xsl:if>
<xsl:if test="count($dirtynodes) > 0">
DIRTY:
<xsl:for-each select="Node">
<xsl:sort select="HostInfo/@fqdn"/>
<xsl:if test="count(Statistics/Bad) > 0">
<xsl:text> </xsl:text><xsl:value-of select="HostInfo/@fqdn" /><xsl:text>
</xsl:text>
</xsl:if>
</xsl:for-each><xsl:text>
</xsl:text>
</xsl:if>
<xsl:if test="count($modifiednodes) > 0">
MODIFIED:
<xsl:for-each select="Node">
<xsl:sort select="HostInfo/@fqdn"/>
<xsl:if test="count(Statistics/Modified) > 0">
<xsl:text> </xsl:text><xsl:value-of select="HostInfo/@fqdn" /><xsl:text>
</xsl:text>
</xsl:if>
</xsl:for-each><xsl:text>
</xsl:text>
</xsl:if>
<xsl:if test="count($stalenodes[count(.|$pingablenodes)= count($pingablenodes)]) > 0">
STALE:
<xsl:for-each select="Node">
<xsl:sort select="HostInfo/@fqdn"/>
<xsl:if test="count(Statistics/Stale)-count(HostInfo[@pingable='N']) > 0">
<xsl:text> </xsl:text><xsl:value-of select="HostInfo/@fqdn" /><xsl:text>
</xsl:text>
</xsl:if>
</xsl:for-each><xsl:text>
</xsl:text>
</xsl:if>
<xsl:if test="count($unpingablenodes) > 0">
UNPINGABLE:
<xsl:for-each select="Node">
<xsl:sort select="HostInfo/@fqdn"/>
<xsl:if test="count(HostInfo[@pingable='N']) > 0">
<xsl:text> </xsl:text><xsl:value-of select="HostInfo/@fqdn" /><xsl:text>
</xsl:text>
</xsl:if>
</xsl:for-each><xsl:text>
</xsl:text>
</xsl:if>
</pre></description>
<link>http://www-unix.mcs.anl.gov/cobalt/bcfg2/index.html</link>
</item>
</xsl:template>
</xsl:stylesheet>
|