Changeset 747 for branches/0.4/web/addons/job_monarch
- Timestamp:
- 03/25/13 17:50:13 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.4/web/addons/job_monarch/libtoga.php
r746 r747 664 664 foreach( $nodes as $hostname => $nimage ) 665 665 { 666 if( s ubstr( $hostname, $domain_len ) != $tdomain)666 if( strpos( $hostname, $tomdain ) !== false ) 667 667 { 668 668 $fqdn = 0; … … 677 677 if( $tdomain && $fqdn ) 678 678 { 679 if( s ubstr( $thostname, $domain_len ) != $tdomain)679 if( strpos( $thostname, $tdomain ) !== false ) 680 680 { 681 681 $thostname = $thostname . '.'.$tdomain; … … 724 724 } 725 725 } 726 else if( $name == 'METRIC' and strstr( $attrs['NAME'], 'zplugin_monarch') and $this->proc_cluster == $this->clustername )727 { 728 if( str str( $attrs['NAME'], 'zplugin_monarch_heartbeat' ))726 else if( $name == 'METRIC' and ( strpos( $attrs['NAME'], 'zplugin_monarch' ) !== false ) and $this->proc_cluster == $this->clustername ) 727 { 728 if( strpos( $attrs['NAME'], 'zplugin_monarch_heartbeat' ) !== false ) 729 729 { 730 730 $this->heartbeat['time'] = $attrs['VAL']; 731 731 } 732 else if( str str( $attrs['NAME'], 'zplugin_monarch_down' ))732 else if( strpos( $attrs['NAME'], 'zplugin_monarch_down' ) !== false ) 733 733 { 734 734 $fields = explode( ' ', $attrs['VAL'] ); … … 766 766 } 767 767 } 768 else if( str str( $attrs['NAME'], 'zplugin_monarch_offline' ))768 else if( strpos( $attrs['NAME'], 'zplugin_monarch_offline' ) !== false ) 769 769 { 770 770 $fields = explode( ' ', $attrs['VAL'] ); … … 802 802 } 803 803 } 804 else if( str str( $attrs['NAME'], 'zplugin_monarch_job' ))804 else if( strpos( $attrs['NAME'], 'zplugin_monarch_job' ) !== false ) 805 805 { 806 806 sscanf( $attrs['NAME'], 'zplugin_monarch_job_%d_%s$', $monincr, $jobid ); … … 868 868 // Let's see if Ganglia use's FQDN or short hostnames 869 869 // 870 if( s ubstr( $first_host, $domain_len ) != $domain)870 if( strpos( $first_host, $domain ) === false ) 871 871 { 872 872 $this->fqdn = 0; … … 885 885 if( $this->fqdn && isset( $jobs[$jobid]['domain'] ) ) 886 886 { 887 if( s ubstr( $node, $domain_len ) != $domain)887 if( strpos( $node, $domain ) === false ) 888 888 { 889 889 $host = $node. '.'.$domain;
Note: See TracChangeset
for help on using the changeset viewer.