Index: branches/eam_branches/ipp-20120905/ippMonitor/INSTALL
===================================================================
--- branches/eam_branches/ipp-20120905/ippMonitor/INSTALL	(revision 34575)
+++ branches/eam_branches/ipp-20120905/ippMonitor/INSTALL	(revision 34735)
@@ -24,2 +24,5 @@
 # Note: we use a 'science databases (replication) slave' and the ippMonitor read-only account to connect to that database
 psconfigure --dbhost scidbs1 --dbuser ippMonitor --dbpass ippMonitor --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config
+
+psconfigure --dbhost scidbm --dbuser ipp --dbpass ipp --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config
+
Index: branches/eam_branches/ipp-20120905/ippMonitor/Makefile.in
===================================================================
--- branches/eam_branches/ipp-20120905/ippMonitor/Makefile.in	(revision 34575)
+++ branches/eam_branches/ipp-20120905/ippMonitor/Makefile.in	(revision 34735)
@@ -240,5 +240,7 @@
 $(DESTWWW)/lapRuns.php \
 $(DESTWWW)/lapExposures.php \
-$(DESTWWW)/lapStacks.php
+$(DESTWWW)/lapStacks.php \
+$(DESTWWW)/failedStaticsky.php \
+$(DESTWWW)/staticsky_failure.php
 
 PICTURES = \
Index: branches/eam_branches/ipp-20120905/ippMonitor/def/failedStaticsky.d
===================================================================
--- branches/eam_branches/ipp-20120905/ippMonitor/def/failedStaticsky.d	(revision 34735)
+++ branches/eam_branches/ipp-20120905/ippMonitor/def/failedStaticsky.d	(revision 34735)
@@ -0,0 +1,27 @@
+TABLE staticskyRun JOIN staticskyResult USING(sky_id) JOIN staticskyInput USING(sky_id) JOIN stackRun USING(stack_id)
+TITLE Static Sky Failed
+FILE  failedStaticsky.php
+MENU  ipp.stack.dat
+
+WHERE staticskyResult.fault != 0
+
+ARGS  ARG1   staticskyRun.sky_id=$staticskyRun.sky_id
+ARGS  ARG1   basename=$staticskyResult.path_base
+
+#        field                          size  format  name           show     link to         extras
+FIELD staticskyRun.sky_id,          5, %d,     Sky ID
+FIELD staticskyRun.label,    	    7, %s,     Label
+FIELD staticskyRun.state,    	    7, %s,     State,		value,		staticsky_failure.php, ARG1
+FIELD stackRun.skycell_id,          5, %s,     Skycell ID
+FIELD stackRun.tess_id,             5, %s,     Tess ID
+FIELD count(stackRun.filter),       5, %d,     #Filters	
+FIELD stackRun.label AS stackRunLabel,   5, %s,     Stack Label
+FIELD staticskyRun.data_group, 	    7, %s,     data grp
+FIELD staticskyRun.dist_group, 	    7, %s,     dist grp
+FIELD staticskyResult.sources,      7, %d,     n(sources)
+FIELD staticskyResult.fault,        7, %d,     fault
+FIELD staticskyResult.quality,      7, %d,     quality
+FIELD staticskyResult.path_base,    5, %s,     path_base,     none
+
+MODE summary
+GROUP staticskyRun.sky_id
Index: branches/eam_branches/ipp-20120905/ippMonitor/def/staticsky_failure.d
===================================================================
--- branches/eam_branches/ipp-20120905/ippMonitor/def/staticsky_failure.d	(revision 34735)
+++ branches/eam_branches/ipp-20120905/ippMonitor/def/staticsky_failure.d	(revision 34735)
@@ -0,0 +1,27 @@
+TABLE staticskyRun JOIN staticskyResult USING(sky_id) JOIN staticskyInput USING(sky_id) JOIN stackRun USING(stack_id)
+TITLE Static Sky Failed (Log)
+FILE  failedStaticsky.php
+MENU  ipp.stack.dat
+
+WHERE staticskyResult.fault != 0
+
+ARGS  ARG1   staticskyResult.path_base=$staticskyResult.path_base
+
+#        field                          size  format  name           show     link to         extras
+FIELD staticskyRun.sky_id,          5, %d,     Sky ID
+FIELD staticskyRun.label,    	    7, %s,     Label
+FIELD staticskyRun.state,    	    7, %s,     State,		value,		staticsky_failure.php, ARG1
+FIELD stackRun.skycell_id,          5, %s,     Skycell ID
+FIELD stackRun.tess_id,             5, %s,     Tess ID
+FIELD count(stackRun.filter),       5, %d,     #Filters	
+FIELD stackRun.label,               5, %s,     Stack Label
+FIELD staticskyRun.data_group, 	    7, %s,     data grp
+FIELD staticskyRun.dist_group, 	    7, %s,     dist grp
+FIELD staticskyResult.sources,      7, %d,     n(sources)
+FIELD staticskyResult.fault,        7, %d,     fault
+FIELD staticskyResult.quality,      7, %d,     quality
+FIELD staticskyResult.path_base,    5, %s,     path_base,     none
+
+GROUP staticskyRun.sky_id
+
+TAIL PHP insert_log ('LOG.EXP');
Index: branches/eam_branches/ipp-20120905/ippMonitor/raw/czartool_labels.php
===================================================================
--- branches/eam_branches/ipp-20120905/ippMonitor/raw/czartool_labels.php	(revision 34575)
+++ branches/eam_branches/ipp-20120905/ippMonitor/raw/czartool_labels.php	(revision 34735)
@@ -465,5 +465,5 @@
         createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0);
 
-        $link = $defaultlink;
+        $link = "failedStaticsky.php?pass=" . $pass . "&proj=" . $proj . "&staticskyRun.label=" . $thisLabel . "&staticskyRun.state=".$searchState;
         getStateAndFaults($db, $thisLabel, $selectedState, "staticsky", $str, $anyFaults);
         createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0);
Index: branches/eam_branches/ipp-20120905/ippMonitor/raw/ipp.php
===================================================================
--- branches/eam_branches/ipp-20120905/ippMonitor/raw/ipp.php	(revision 34575)
+++ branches/eam_branches/ipp-20120905/ippMonitor/raw/ipp.php	(revision 34735)
@@ -799,9 +799,15 @@
   // echo "<b>class_id: $class_id</b><br>\n";
   // echo "<b>camera:   $camera</b><br>\n";
+  // echo "<b>filerule:   $filerule</b><br>\n";
 
   if (! $class_id) { $class_id = "NONE"; }
 
+  //SCH: I set a default value for the 'camera' which is based on the
+  //'proj' parameter.
+  //It's necessary for staticsky logs and it would require to join tables
+  //back to the warpRun table
+  if (! $camera) { $camera = strtoupper($_GET['proj']); }
+
   if ($basename && $camera && $filerule) {
-
     // do I need to do this to the output result as well?
     $basename = escapeshellarg($basename);
@@ -841,4 +847,5 @@
       return;
     }
+    echo "<b>log filename: $filename</b><br>\n";
 
     echo "<pre>\n";
@@ -850,4 +857,5 @@
   }
 }
+
 
 // expect image supplied with key=name
Index: branches/eam_branches/ipp-20120905/ippMonitor/raw/ipp.stack.dat
===================================================================
--- branches/eam_branches/ipp-20120905/ippMonitor/raw/ipp.stack.dat	(revision 34575)
+++ branches/eam_branches/ipp-20120905/ippMonitor/raw/ipp.stack.dat	(revision 34735)
@@ -36,2 +36,3 @@
 menulink  | menuselect   | link    | Static Sky Processed Skyfile | staticskyProcessedSkyfile.php
 menulink  | menuselect   | link    | Static Sky Failed Skyfile    | staticskyFailedSkyfile.php
+menulink  | menuselect   | link    | Static Sky Failed            | failedStaticsky.php
Index: branches/eam_branches/ipp-20120905/ippMonitor/raw/site.php.in
===================================================================
--- branches/eam_branches/ipp-20120905/ippMonitor/raw/site.php.in	(revision 34575)
+++ branches/eam_branches/ipp-20120905/ippMonitor/raw/site.php.in	(revision 34735)
@@ -47,8 +47,13 @@
 $REPL_DBNAME_ISP = "ippc17 (isp)";
 
-$REPL_HOST_NEBULOUS_SECONDARY = "ippc63.IfA.Hawaii.Edu";
+$REPL_HOST_NEBULOUS_SECONDARY = "ippdb04.IfA.Hawaii.Edu";
 $REPL_USER_NEBULOUS_SECONDARY = "ippMonitor";
 $REPL_PASSWORD_NEBULOUS_SECONDARY = "ippMonitor";
-$REPL_DBNAME_NEBULOUS_SECONDARY = "ippc63 (secondary nebulous / 50,000 sec behind is acceptable)";
+$REPL_DBNAME_NEBULOUS_SECONDARY = "ippdb04 (secondary nebulous / 50,000 sec behind is acceptable / usually stopped on Mondays and Tuesdays)";
+
+$REPL_HOST_NEBULOUS_TERNARY = "ippc63.IfA.Hawaii.Edu";
+$REPL_USER_NEBULOUS_TERNARY = "ippMonitor";
+$REPL_PASSWORD_NEBULOUS_TERNARY = "ippMonitor";
+$REPL_DBNAME_NEBULOUS_TERNARY = "ippc63 (secondary nebulous / 50,000 sec behind is acceptable / usually stopped on Mondays and Tuesdays)";
 
 
