2
1
0

Hi NMIS Experts,

 

I deleted events on the nmis model but I don't know how to add them back.

One event I deleted is Proactive CPU but now I want to add it back but I don't know how.

Your help would be much appreciated.

 

Thanks in advance.

 

Regards,

 

Jerry

    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      Hello Jerry,

      You are in luck, an original copy of every model is stored in /usr/local/nmis8/models-install You could copy the backup into your models folder (/usr/local/nmis8/models), or simply harvest the section you need from it.

      In the future simply comment out the section of the model you do not need using the hash #.

      Regards,

      Mark H

      1. Jerry Yray

        Hi Mark, Thank you for the info. I will do your recommendation next time. Cheers! Regards, Jerry

      CommentAdd your comment...
    2.  
      1
      0
      -1

      To expand on Mark's answer, you can also use /usr/local/nmis8/admin/diffconfigs.pl to see the differences between your current/incomplete and the original model file.

      1. Jerry Yray

        Hi Alex, How can I open this /usr/local/nmis8/admin/diffconfigs.pl? Same as .nmis I don't know how to open it. Sorry I'm not a linux expert. :) Thanks. Regards, Jerry

      2. Alexander Zangerl

        it's a program you can run when you're connected to your nmis host in an interactive session (generally via ssh, or your virtualisation console if you're running the Opmantek VM appliance); the invocation would be similar to this: cd /usr/local/nmis8; ./admin/diffconfigs.pl models/Model-net-snmp.nmis models-install/Model-net-snmp.nmis (you'll have to substitute the name of the actual model file in question in the last two arguments.)

      3. Jerry Yray

        Hi Alex, I have followed your guide. I access via ssh(putty), login as root, cd /usr/local/nmis8, models/Model-PingOnly.nmis and I got this error: -bash: models/Model-PingOnly.nmis: Permission Denied Thanks. Regards, Jerry

      4. Alexander Zangerl

        you missed half the command and told the shell to "run" a model file, which fails as expected: model files are not standalone programs, they are not executable. the sequence should have been (note the diffconfigs part): cd /usr/local/nmis8; ./admin/diffconfigs.pl models/Model-PingOnly.nmis models-install/Model-PingOnly.nmis

      5. Jerry Yray

        Hi Alex, Great guide. I was able to compare them. Also, how can I open the content of Model-PingOnly.nmis? Thanks. Regards, Jerry

      6. Mark Henry

        Jerry, There are several text based editors available in Linux. Personally, I prefer vim - online documentation can be found HERE: http://www.vim.org/docs.php and a nice Quick Reference Card HERE: http://tnerual.eriogerg.free.fr/vimqrc.html

      CommentAdd your comment...