See the License for the specific language governing permissions and
limitations under the License.
- This source code is part of the near-RT RIC (RAN Intelligent Controller)
- platform project (RICP).
==================================================================================
*/
package main
import (
"encoding/json"
+ "gerrit.o-ran-sc.org/r/ric-plt/alarm-go.git/alarm"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientmodel"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
)
if err != nil {
xapp.Logger.Error("subscription failed (%s) with error: %s", meid, err)
+
+ // subscription failed, raise alarm
+ err := xapp.Alarm.Raise(8086, alarm.SeverityCritical, meid, "subscriptionFailed")
+ if err != nil {
+ xapp.Logger.Error("Raising alarm failed with error %v", err)
+ }
+
return
}
xapp.Logger.Info("Successfully subcription done (%s), subscription id : %s", meid, *resp.SubscriptionID)
}
hw := HWApp{
- stats: xapp.Metric.RegisterCounterGroup(metrics, "hw-go"), // register counter
+ stats: xapp.Metric.RegisterCounterGroup(metrics, "hw_go"), // register counter
}
hw.Run()
}